Stack resize problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
Stack resize problem
I have a stack with the width divided into two portions. The laft is a narrow verticle column of controls and the right is a wide picture area.
I want to reduce the width of the stack so the controls portion is chopped off, leaving the right hand end only.
I have tried setting the width and height and location to the necessary size, but this just chops off the right hand end.
I have added a suitable width to the first element of the stack location, but again, this just chops of the right side and shifts the stack right.
Any ideas how to move the left edge towards the right so only the rightmost part of the full display is visible?
I want to reduce the width of the stack so the controls portion is chopped off, leaving the right hand end only.
I have tried setting the width and height and location to the necessary size, but this just chops off the right hand end.
I have added a suitable width to the first element of the stack location, but again, this just chops of the right side and shifts the stack right.
Any ideas how to move the left edge towards the right so only the rightmost part of the full display is visible?
Re: Stack resize problem
Hi,
Group all controls, set the left of the group to -100 or whatever is convenient, and set the rect of the card to the current rect subtracting 100 from item 3.
Kind regards,
Mark
Group all controls, set the left of the group to -100 or whatever is convenient, and set the rect of the card to the current rect subtracting 100 from item 3.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Stack resize problem
Hi Mark,
Best regards
Jean-marc
I'am confused. It is possible to set the rect of a cd ?set the rect of the card to the current rect subtracting 100 from item 3

Best regards
Jean-marc
https://alternatic.ch
Re: Stack resize problem
Sorry, Jean-Marc, that should be stack.
Mark
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Stack resize problem
Hi Happyrever,
here is a little stack for the stack resize problem.
Kind regards
Bernd
here is a little stack for the stack resize problem.
Kind regards
Bernd
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
Re: Stack resize problem
Thank you for the stack it will show the way nicely.
Re: Stack resize problem
Hi Bernd,
toggleWidthOfStack is nice
I dont know "step" (dictionary and release notes also)
Where come it from ?
Best from Geneva
Jean-Marc
toggleWidthOfStack is nice
Code: Select all
repeat with i = 1 to tIRedWidth step 5
Where come it from ?

Best from Geneva
Jean-Marc
https://alternatic.ch
Re: Stack resize problem
Hi Jean-Marc,
thank you.
from the dictionary:
But you can use step if you want to omit some intermediate steps. As in the example. It is actually quite handy at times.
Kind regards
Bernd
thank you.
I use it regularly, It is part of the "repeat with" options. When you mentioned it that it is not in the dictionary I looked it up. It is there but it is hard to find/understand:I dont know "step" (dictionary and release notes also)
Where come it from ?
from the dictionary:
and* with counter = startValue [to | down to] endValue [step increment]....
If you specify an increment, the increment is added to the counter each time through the loop, rather than the counter being increased by 1. (The increment is not treated as an absolute value: if you're using the down to form, the increment must be negative.)
it is really not very clear how to use it.The following example loops backwards through a set of lines. The counter myLine is 20 during the first iteration, 18 during the second, and so on:
repeat with myLine = 20 down to 1 step -2
put myLine
end repeat
But you can use step if you want to omit some intermediate steps. As in the example. It is actually quite handy at times.
Kind regards
Bernd
Re: Stack resize problem
Hi Bernd,
Thank for explanation about step
Best regards
Jean-Marc
Thank for explanation about step
Yes. Your stack is the best explanation (change the value of step and see what happend)It is there but it is hard to find/understand
Best regards
Jean-Marc
https://alternatic.ch