![]() | The List Box component offers a facility to select a value from a
pre-defined set of possible values. Clich here for an overview of the differences and similarities between the various components that provide selection list and input box capabilities. |
The Drop Down List is almost the same as the list box. The difference is that the Drop Down List allows a choice to be erased after a value has been selected.
The functionality offered by the List Box is almost the same as the functionality offered by the Radio Button; the difference between the two types of gadges is in the method of presentation of the possible values, and the method of selecting a value from the list of possibilities.
Another difference between the list box and the long list box is that the long list also allows multiple selections from the items listed.
Hint: If the list of possible values is "only two possible values", a Check Box might be preferrable. When the list is up to five, the Radio Button is probably the best approach. Up to a couple of dozen, the List Box or Drop Down List is the best way, and if the list is even longer, the Long List Box is to be preferred.
The events that are recognized for components of the type ListBox are: Choose, Create, Destroy, Enter, Exit, change, dblClick, deselect, gotFocus, help, lostFocus and select.
The default property for a list box is Value.
The property list for a list box is:
Property Name (MSM-Workstation) | Property Name (MWAPI) | Default Value | Value Range |
---|---|---|---|
Active | ACTIVE | Boolean value | |
BackColor | BCOLOR | Color | |
Cancel | CANCEL | Boolean value | |
Changed | CHANGED | Boolean value | |
ChoiceField | Field | ||
ChoiceVar | Field | ||
Container | Free text | ||
DataField | Field | ||
DisplayOnly | CANCHANGE | Boolean value | |
FontBold | FSTYLE | Boolean value | |
FontFace | FFACE | Font face | |
FontItalic | FSTYLE | Boolean value | |
FontSize | FSIZE | Font size | |
FontUline | FSTYLE | Boolean value | |
ForeColor | FCOLOR | Color | |
MaxSelect | SELECTMAX | Positive integer numeric value | |
Message | ZMESSAGE | Free text | |
Name | Name of component (current window) | ||
NextControl | NEXTG | Name of component | |
Pointer | PTYPE | Pointer (extended) | |
PosLeft | POS | Positive numeric value | |
PosTop | POS | Positive numeric value | |
PosUnits | POS | Unit Specification | |
SizeHeight | SIZE | 40 | Positive numeric value |
SizeUnits | SIZE | Unit Specification | |
SizeWidth | SIZE | 40 | Positive numeric value |
TBackColor | TBCOLOR | Color | |
TFontBold | TFSTYLE | Boolean value | |
TFontFace | TFFACE | Font face | |
TFontItalic | TFSTYLE | Boolean value | |
TFontSize | TFSIZE | Font size | |
TFontUline | TFSTYLE | Boolean value | |
TForeColor | TFCOLOR | Color | |
TabStops | ZTABSTOPS | Tabulator stops | |
Title | TITLE | [Title] | Free text |
TitlePos | TPOS | Title position | |
TopRow | TOPSHOW | Item in list of choices | |
Type | TYPE | LIST | Type of component |
Units | UNITS | Unit Specification | |
Value | VALUE | ||
VarName | Name of variable | ||
VarPermanent | Boolean value | ||
Visible | VISIBLE | Boolean value | |
Go back to the alphabetic list of components.