SIZE

IUP - Portable User Interface

SIZE

Specifies the element User size, and returns the Current size, 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).

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.

So SIZE depends on FONT, FONT must be set before SIZE for correct size calculation.

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

A size of 0 is not allowed, but the User size can be removed setting its value to NULL.

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.

The element is NOT immediately repositioned. Call IupRefresh to update the dialog layout.

IupMap also updates the dialog layout even if it already mapped, so using it or using IupShow, IupShowXY or IupPopup (they all call IupMap) will also update the dialog layout.

See the Layout Guide for mode details on sizes.

Affects

All, except menus.

See Also

EXPAND, SHRINK, RASTERSIZE, IupRefresh