Common Properties

The set of combo box common properties includes:

TITLE

Combo boxes do not have titles.

VALUE

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.

SIZE

Describes the width of the entry field portion of the combo box. SIZE is calculated using the standard width of the font selected. The LINES value describes the number of lines shown in the combo box. The entry field portion of the box counts as one of the lines. The remaining lines are part of the list box. Any overhead needed for boxes and other sub-controls (such as scroll bars) is added to these values. Note that a vertical scroll bar is automatically added when the number of items in the list exceeds the value of LINES.

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.

COLOR

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.

ATW-CSS-CLASS

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-CLASS should represent a corresponding class in the current theme ( cascading style sheet) deployed when you run your program through AcuToWeb. This property can be applied to more than one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

ATW-CSS-ID

This property enables you to apply CSS styles to the control when the program is run through AcuToWeb. The value of ATW-CSS-ID should represent a corresponding ID in the current theme (cascading style sheet) deployed when you run your program through AcuToWeb. The value of this property must be unique, and only applied to one control in your program.

If both the ATW-CSS-CLASS and ATW-CSS-ID properties are specified for this control, and both correspond to the same style in the style sheet, the style specified by ATW-CSS-ID takes precedence.

See Cascading Style Sheet Syntax for more information about additional in-built styles in AcuToWeb.

EVENT-LIST, EXCLUDE-EVENT-LIST

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.

Styles

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.