size

Specifies an item's size. It does not include external labels, borders, or scroll bars. These are part of the bounding box size which is calculated automatically.

Examples of item size are the input area in a field item or the height and width of the label in label and button items.

Syntax

   <size>
      <width>width</width>
      <height>height</height>
   </size>
Table 1. size parameters
Parameter Type Description
width unsigned byte the horizontal dimension of the item, measured in characters
height unsigned byte the vertical dimension of the item, measured in lines

Available in

box, button, check, combobox, field, label, line, list, popup, radio, richtext, slider, spacer

Example

This sample sets the item's size to 80 characters wide by five lines high.

   <size>
      <width>80</width>
      <height>5</height>
   </size>

Usage details

  1. Default: refer to Default sizes of items for a complete list of default sizes.
  2. Size and Font:
    • The width might not always accommodate the number of characters specified. The calculation to determine actual width is:
    • width * (average character width for the item's font)
    • The width will only exactly match the number of characters the item can display horizontally when the font is monospaced (like Courier).
  3. If either the height or the width is invalid, the default item size will be used. A dimension of zero (0) is invalid for all items except the line item.
  4. The item and bounding box sizes can be changed by using itemlocation with an expansion or extent modifier. This will override the size option.