The set of combo box common properties includes:
Combo boxes do not have titles.
Alphanumeric values that represent the data in the entry field portion of the control. For combo boxes with the DROP-LIST style, the value represents the selected list item. In this case, the handling of the value is the same as for list boxes.
The default LINES value is 5. The default SIZE value depends on whether or not a VALUE is specified when the combo box is created. If a VALUE is specified, the default SIZE value equals the size of the VALUE literal or data item. Otherwise, the default SIZE is 12.
On non-graphical systems, to show less data in the combo box than is present in the data items, set SIZE to the desired width and MAX-TEXT to the length of the longest data item.
When the program executes on a non-graphical system, the values specified in the CLINES and CSIZE phrases, if present, replace the values specified by the LINES and SIZE phrases.
Any foreground and background colors specified in the program are used. If the background color is not specified, the owning subwindow's background color is used. If the foreground color is not specified, a system-default color is used. Note that color handling in combo boxes is tricky, because there are several components that make up a control. You will not be able to control all of the colors shown using just foreground and background colors. For this reason, we suggest using the default colors.
EVENT-LIST is an exclusive list of events that are either sent to or withheld (blocked) from the program depending on the value of EXCLUDE-EVENT-LIST. See Common Screen Options in the ACUCOBOL-GT Reference Manual for more information.
DROP-DOWN | Indicates that the list portion of the control is normally hidden. To see the list, the user pushes a button shown beside the entry field portion, causing it to drop down from the entry field. This is the default style. |
STATIC-LIST | Causes the list to be permanently displayed on the screen. |
DROP-LIST | Similar to the DROP-DOWN style, except that the entry field is replaced by a static display of the currently selected list item. |
UNSORTED | This style is the same as the list box style of the same name. |
3-D | This style behaves identically to the 3-D entry field style of the same name. |
LOWER | This style converts all the text in the box to lower-case. |
UPPER | This style converts all the text in the box to upper-case. |
NOTIFY-DBLCLICK | This style causes the combo box to generate CMD-DBLCLICK events. Normally, double-clicking on an item in the combo box has no special effect. If you specify this style, double-clicking on an item will generate a CMD-DBLCLICK event. This will usually terminate the current ACCEPT statement and allow your program to act on the selection immediately. You can also use an embedded EXCEPTION PROCEDURE in the Screen Section to perform immediate processing. Note that this style is generally useful only for STATIC-LIST style boxes, because the other types of combo boxes close their drop-down list as soon as the user clicks an item (effectively preventing the ability to perform a double-click). See also the TERMINATION-VALUE and EXCEPTION-VALUE properties for related topics |
NOTIFY-SELCHANGE | This style causes the combo box to generate NTF-SELCHANGE events. Normally, selecting an item in the combo box has no special effect. If you specify this style, a selection change will generate an NTF-SELCHANGE event. This allows your program to act immediately on the new selection. |