[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'MUIClass.Area' (#MUIClass)

TMUIArea.Weight

The weight of an object determines how much room it will get during the layout process.

Declaration

Source position: MUIClass.Area.pas line 169

published property TMUIArea.Weight : Integer
  read FWeight
  write SetWeight
  default 100;

Description

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.

See also

HorizWeight

  

Adjust the horizontal weight of an object.

VertWeight

  

Adjust the vertical weight of an object.


Documentation generated on: 2019-07-20