Geometry Manager
Robert Brenstein
rjb at robelko.com
Tue Dec 21 18:31:27 EST 2010
On 21.12.2010 at 11:03 Uhr -0800 Peter Haworth apparently wrote:
>Thanks Robert. It does sound like I will need to do the resizing by
>script as you say. But I'm confused about the geometry manager. It
>doesn't appear to do anything right now even though all the objects
>I've looked at are set to scale when the window resizes (the
>default). If I write my own geomanager, do I have to do something
>to stop the LC geomanager doing things in addition to what I do in
>my own geomanager (even though it appears to do nothing right now)?
>
>The reason the geo management issue came up is to deal with
>different screen resolutions. What I need to do is figure out the
>screen resolution at startup and if it has changed since the last
>time the app was run, call my resizing handler to deal with the new
>screen resolution. If I do allow the user to change window sizes, I
>could of course use the same resizing handler but the main use right
>now is to deal with screen resolutions.
>
>There are other issues I'm sure, for example if I resize a field
>control, do I need to reset the font size? I guess it's the fear of
>the unknown that is making me consider just grouping all the objects
>on the card together and adding scroll bars to the group so the user
>can scroll around the window when necessary. It seems like that's
>pretty easy to implement but I would need to see it in action to
>know whether it would be acceptable to the user.
>
>Pete Haworth
The built-in geom mgr does not do anything with content, that is
things like font sizes afaik. Whether you change font size or not,
that is a GUI issue. Often, usually, this is best left for the user
to decide what suits them.
When supporting different screen resolutions, you can program a few
distict geometry states, thus simplifying geometry management
somewhat, but letting user resize the window to their liking is
possibly advantageous and likely a better GUI.
Note that you can set a minimum size of each stack (part of stack
properties), so you can use that to define the smallest window.
Rolling your geom mgr will let you be smarter about what you offer
and do things that normal geom mgr can't (like changing alignment or
arrangement of objects for very small or very large window sizes).
Making a group with scrolbars is of course an alternative. Indeed
makes things simnpler for you, but will the program's usability
suffer? Without knowing your program, it is impossible to give any
GUI-related advice.
Robert
PS Altuit has a plugin that allows to clear all IDE-set properties,
including geom manager, so you can always clean this way. I haven't
used the built-in feature for too long to remember how it works, but
I seem to recall that it was being set for each object independently
and removing its settings for that object in the property inspector
should deactivate it for that object.
More information about the use-livecode
mailing list