Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

<combo-box>

Open abstract instantiable class

Summary

The class of combo boxes, which combine options boxes with text fields.

Superclasses

<collection-gadget> <action-gadget> <text-gadget>

Init-keywords

borders:
An instance of type one-of(#f, #"none", #"flat", #"sunken", #"raised", #"ridge", #"groove", #"input", #"output"). Default value: #f.

scroll-bars:
An instance of type one-of(#f, #"none", #"horizontal", #"vertical", #"both", #"dynamic"). Default value: #"both".

Library

duim-gadgets

Module

duim-gadgets

Description

The class of combo boxes. Combo boxes are similar to option boxes, except that the text field is editable, so that new values can be specified in addition to those already provided in the drop-down list. Users may either choose an existing option from the list, or type in their own.

Figure 8.17 An option box

It is common for additional items typed by the user to be added to the list of options available. A combo box is often used to specify text in a Find dialog box, for example, and any previous search terms can be recalled by choosing them from the list. If you wish to provide this functionality, then you can do so using a combination of add-item and find-item, to search for the presence of an item and add it if it does not already exist.

The borders: init-keyword lets you specify a border around the combo box. If specified, a border of the appropriate type is drawn around the gadget.

The scroll-bars: init-keyword lets you specify the scroll bar behavior for the gadget.

Internally, this class maps into the Windows combo box control.

Operations

None.

Example

contain(make(<combo-box>, value-type: <integer>
                         items: range(from: 1 to: 5)));

See also

<option-box>, page 622

<text-field>, page 674


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index