Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

gadget-selection-mode

Generic function

Summary

Returns the type of selection for the specified gadget.

Signature

gadget-selection-mode gadget => selection-mode

Arguments

gadget
An instance of type <collection-gadget>.

Values

selection-mode
An instance of type one-of(#"single", #"multiple", #"none").

Library

duim-gadgets

Module

duim-gadgets

Description

Returns the selection mode for gadget. Typically, gadgets are either single or multiple selection (that is, either only one item can be selected at a time, or any number of items can be selected), or there is no selection behavior (items cannot be selected). Some gadgets, such as list boxes and button boxes, can choose a selection mode at initialization time using the selection-mode: init-keyword.

Example

Create a radio box as follows:

*radio* := contain(make(<radio-box>, 
                        items: range(from: 0, to: 5)));

The selection mode of the radio box is returned with:

gadget-selection-mode(*radio*);

Because the gadget is a radio box, only one item of which may be selected at a time, the selection mode returned is #"single".

See also

<button-box>, page 535

gadget-selection, page 578

gadget-selection-setter, page 580

<list-box>, page 599


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index