WIDTH attribute

The WIDTH attribute forces an explicit width of a form element.


  1. value is an integer that defines the width of the element.


By default, the width of an element is defined by the size of the form item tag. Use the WIDTH attribute, to define a specific width for a form item.

Note: As a general rule, consider not specifying a unit, to default to relative characters/lines/columns, instead of specifying exact pixels or points. This is especially important for mobile devices, where the screen resolution can significantly vary depending on the smartphone or tablet model.

If you don't specify a size unit for the WIDTH attribute, it defaults to CHARACTERS, which defines a width based on the characters size in the current font.

For sizable items like IMAGE and WEBCOMPONENT, the default width is defined by the number of horizontal characters used in the form item tag. Overwrite this default by specifying the WIDTH attribute:

IMAGE img1: image1, WIDTH = 20, HEIGHT = 12;

For TABLE/TREE containers, the default width is defined by the fields/columns used in the table definition. Overwrite the default by specifying the WIDTH = x COLUMNS attribute. This will give a small initial width for tables with a large number of columns:

TABLE t1: table1, WIDTH = 5 COLUMNS;