# To subscribers of the xforms list from "Reed Riddle" <drriddle@qwest.net> :
Howdy all,
> 4. Better resizing support. Or do I not know enough? I briefly looked
> at the gravity stuff quite some time ago and decided there was too
> much to learn for a 1.0 or 2.0 product, so I put it aside. Is it easy?
> Is this my problem, a problem in the documentation, or does the
> resizing
> issue need better treatment in the api?
Actually, it works pretty well now (1.0R6.1, haven't installed 1.0
yet), but I was having problems with it in one of the earlier
revisions. The key is to decide what should resize on the form, and
what shouldn't; buttons shouldn't, but things like plots should (or
can). fl_set_form_minsize and _maxsize can be used to set the form
resize limits (and set them to the same values for no resizing).
Gravity just means how the object will move. Imagine your form as a
map (N up, S down, E right, W left). How you set the two gravity
values determines how things move. So, if you have a button in the
lower right corner, setting the gravity to (SE,SE) will keep the button
in the same place relative to the corner. Anything set (NE,SW) will
expand with the form, and you can limit things in only one direction
((S,S) will keep things in position up/down but let the move
left/right). Once you get it down for one form, it's easy to port it
to the next; the best way to test it is to increase the form to fill
the screen (usually a menu bar widget does this under X), and see if
things do what you expect.
What I have found is that each object just requires a RESIZE option and
a gravity statement; if you group objects, then the group can be
assigned these properties (i.e. not for each individual object). It's
not hard to add these on, and refitting old programs is pretty
straightforward as well (I'm doing some refitting right now).
Reed
----------------------------------------------------------------------
Dr. Reed L. Riddle
Associate Director of Whole Earth Telescope Operations
Iowa State University Department of Physics & Astronomy
Email: drriddle@qwest.net
Homepage: http://www3.iitap.iastate.edu/~riddle/
"This life has been a test. If it had been an actual life, you would
have received actual instructions on where to go and what to do."
-- Angela Chase, "My so-called life"
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Fri Dec 13 2002 - 21:41:22 EST