All controls have four properties that can be used to describe their minimum and maximum allowed dimensions. Layout managers can use these properties to determine how to size a control. The properties are:
|The control's minimum height.
|The control's maximum height.
|The control's minimum width.
|The control's maximum width.
Each of these properties take a numeric value using the same units as the control's SIZE (width) and LINES (height) properties. Each property has a default value of zero. A value of zero for MAX-HEIGHT and MAX-WIDTH means no maximum.
A layout manager uses these values to limit how much it will modify a control's dimensions. A particular layout manager is free to interpret these values to suit its purposes. The resize manager will treat them as absolute limits.
For example, when creating a multiline entry field, you might want to limit its vertical dimension to have both a minimum and maximum height. One implementation might look like this:
DISPLAY ENTRY-FIELD, MULTILINE LINE 5, COL 10 SIZE 50 CELLS, LINES 10 CELLS MIN-HEIGHT = 1.5 MAX-HEIGHT = 20
In this example, the layout manager will not change the height of the entry field to be less than 1.5 cells or more than 20 cells.
The four properties apply to all controls. Like all property names, they are not reserved words. Therefore, you may use these words as user-defined names anywhere in your program where property names are not allowed (that is, outside of the Screen Section and the scope of DISPLAY, MODIFY, and INQUIRE statements).
Typically, you would start out by leaving the properties at their default values. The default values do not constrain the control's dimensions. Then, to address a particular layout problem, you would set one or more of the properties to resolve the problem. For example, you may want to set a minimum height for a control if the user can resize the window such that the unconstrained control is reduced to a height of zero. Or, you may want to limit an entry field to show no more than the total of lines of data it allows.