On Oct 8, 2005, at 2:12 AM, Carl Karsten wrote:
Do Forms and Sizers both have a sizer colection?
No. Forms (and any other container) have a Sizer property that
references the sizer that is used to determine the size/position of
its member controls.
You are conceptually pretty close; the only difference is that
a sizer is not a container; it's a rule. The actual form
hierarchy is
What is a rule?
It governs how objects are arranged. Take a vertical sizer that
controls 3 objects. The 'rule' says to divide the space according to
the various weights assigned to each object, allowing for any
specified borders around each object, and whether the object expands
in the horizontal direction to fill up the available space.
How does .layout() know what text boxes go with what sizers?
Objects are 'assigned' to a sizer by calling sizer.append(obj).
This adds the object to the list of objects that the sizer controls.
An object can only be added to a single sizer; attempting to add it
to more than one will raise an error.
Sizers can control three types of objects: controls, spacers and
other sizers.
gets their size and position
I thought nothing had a position? I think you skipped a step.
Nothing has a *pre-determined* position, as you are used to in
VFP. Upon each call to layout, the sizer will calculate the size and
position of each of its objects, based upon the current constraints.
Every time you resize a form, the size and position of every object
is recalculated and updated.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users