HTBasic Help
×
Menu
Index

INTERDEPENDENT ATTRIBUTES

 
 
The COLUMNS attribute, FONT attribute, and WIDTH common attribute are interdependent. Similarly, the ROWS attribute, FONT attribute, and HEIGHT common attribute are interdependent.
 
If You Set:
Then:
ROWS
The value of HEIGHT will be automatically adjusted to provide the number of specified ROWS based on the value of the FONT attribute. Applies only to the listbox portion. Selection field is not included in the ROWS attribute's argument.
COLUMNS
The value of WIDTH will be automatically adjusted to provide the number of specified COLUMNS based on the value of the FONT attribute.
WIDTH
The value of COLUMNS will be automatically adjusted to provide the specified WIDTH based on the value of the FONTattribute. Specifying a -1 yields a default value.
HEIGHT
The value of ROWS will be automatically adjusted to provide the specified HEIGHT based on the value of the FONT attribute. Applies only to the listbox portion. Display and edit are not included in the ROWS attribute's argument. Specifying a -1 yields a default value.
FONT
The values of ROWS and COLUMNS will be automatically adjusted to fit into the size of the widget (that is, WIDTH by HEIGHT does not change).
 
For Constant Widget Size:
 
If you want to place a widget in a PANEL or otherwise so that it will not grow to encroach on its neighbor widgets, set the values of WIDTH and HEIGHT to the desired numbers of pixels. ROWS and COLUMNS will adjust based on the value of the FONT attribute.
 
Setting the value of FONT will not change the size of a widget. WIDTH and HEIGHT set the exterior dimensions of the widget, whereas ROWS and COLUMNS affect only the work area dimensions.
 
Incompatible Attribute Values:
 
You do not have to worry about setting these values incompatibly, because the attribute you set last in your program will take precedence, as shown in the table above.
 
For example, if you set ROWS, COLUMNS, FONT, WIDTH, and HEIGHT in that order in your program, the widget will use your FONT, WIDTH, and HEIGHT values and will ignore your ROWS and COLUMNS values. Instead of using your values, the widget will automatically set the ROWS and COLUMNS attribute values.