SIZE

IUP - Portable User Interface

SIZE

Size of the element in units proportional to the size of a character.

Value

"widthxheight", where width and height are integer values corresponding to the horizontal and vertical size, respectively, in characters fraction unit (see Notes bellow).

When it is not defined then it will be calculated to fit the contents of the control, this is called the control's natural size. Its natural size or its defined size are used as the minimum size for the control when the control is expanded or reduced.

You can also change only one of the parameters by removing the other one and maintaining "x". For example: "x40" (height only) or "40x" (width only). The other parameter will be obtained from the natural size.

When this attribute is consulted the actual size of the control is returned.

Notes

The size units observes the following heuristics:

  • Width in 1/4's of the average width of a character for the current FONT of each control.
  • Height in 1/8's of the average height of a character for the current FONT of each control.

When this attribute is changed, the RASTERSIZE attribute is automatically updated.

If you wish to use this size only as an initial size, change this attribute to NULL after the control is mapped, the returned size in IupGetAttribute will still be the actual size.

Affects

All.

See Also

EXPAND, RASTERSIZE