Geometry Manager Re: Stack window/screen sizes
rjb at robelko.com
Tue Dec 21 20:27:15 EST 2010
On 21.12.2010 at 15:34 Uhr -0800 Peter Haworth apparently wrote:
>I am now thinking that I may be able to make use of my own custom
>properties along with some common code to implement all this.
>Without that, it sounds like thousands of lines of code.
>Alternatively, I'm naively hoping that I might be able to write some
>code that will simply adjust the size of controls and the distance
>between them based on the ratio between the old and new screen
>sizes. For example, if the user reduces the screen size by 10%
>horizontally, it seems like I should be able to reduce the width of
>all the controls and the horizontal distance between them by 10% and
>everything should fit.
>I'm sure I;d need a way to deal with exceptions (cprops?). Is that
If there are any patterns, you can, of course, write functions to
handle specific tasks or combinations of tasks for you. For example,
I often have a series of buttons, a varying number of them, along the
bottom edge of a window. They should be at a certain distance from
the bottom and with certain offset to the right edge of the window
and a fixed space between them. I have a function which gets long ids
of those buttons, from rightmost to leftmost, and positions them
automagically as user resizes a card. Same function is called on any
card that has 1 or more such buttons.
More information about the Use-livecode