All Manuals > CAPI User Guide > 6 Choices > 6.8 General properties of choices

NextPrevUpTopContentsIndex

6.8.2 Selections

All choices have a selection. This is a state representing the items currently selected. The selection is represented as a vector of offsets into the list of the choice's items, unless it is a single-selection choice, in which case it is just represented as an offset.

The initial selection is controlled with the initarg :selection . The accessor choice-selection is provided.

Generally, it is easier to refer to the selection in terms of the items selected, rather than by offsets, so the CAPI provides the notion of a selected item and the selected items . The first of these is the selected item in a single-selection choice. The second is a list of the selected items in any choice.

The accessors choice-selected-item and choice-selected-items provide access to these conceptual slots, and you can also supply the values at make-instance time via the initargs :selected-item and :selected-items .


CAPI User Guide (Windows version) - 30 Aug 2011

NextPrevUpTopContentsIndex