Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

<list-box>

Open abstract instantiable class

Summary

The class of list boxes.

Superclasses

<collection-gadget> <action-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 list boxes.

Figure 8.19 A list box

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

The scroll-bars: init-keyword lets you specify the presence of scroll bars around the gadget. By default, both horizontal and vertical scroll bars are created. You can also force the creation of only horizontal or vertical scroll bars, or you can create scroll bars dynamically: that is, have them created only if necessary, dependent on the size of the gadget. If scroll-bars: is #f, no scroll bars are added to the gadget.

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

Operations

None.

Example

The following creates a list of three items, without scroll bars.

*list* := contain(make(<list-box>, 
                       items: #(#("One", #"one"),
                                #("Two", #"two"),
                                #("Three", #"three")),
                       label-key: first, 
                       value-key: second, 
                       scroll-bars: #f));

See also

<list-control>, page 601

<list-item>, page 609


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index