The weight of an object determines how much room it will get during the layout process.
Source position: MUIClass.Area.pas line 172
published property TMUIArea.Weight : Integer |
This tag is a shorthand for HorizWeight and VertWeight, it sets both weights at once.
Imagine you have a 100 pixel wide horizontal group with two string gadgets. Usually, each gadget will get half of the room and be 50 pixels wide. If you feel the left gadget is more important and should be bigger, you can give it a weight of 200 (and 100 for the right gadget). Because the left gadget is twice as "heavy" as the right gadget, it will become twice as big (about 66 pixel) as the right one (34 pixel).
Of course giving weights only makes sense if the object is resizable. A VertWeight for a (always fixed height) string gadget is useless.
An object with a weight of 0 will always stay at its minimum size.
By default, all objects have a weight of 100.
|
Adjust the horizontal weight of an object. |
|
|
Adjust the vertical weight of an object. |