1 CAPI Reference Entries

choice-selected-item

Generic Function

Summary

The functionchoice-selected-item returns the currently selected item in a single selection choice.

Syntax

choice-selected-item choice

Description

The functionchoice-selected-item returns the currently selected item in a single selection choice. Asetf method is provided as a means of setting the selection. It is an error to call this function on choices with different interactions -- in that case, you should usechoice-selected-items.

Example

First we set up a single selection choice -- in this case, a list panel.

(setq list (capi:contain
            (make-instance 'capi:list-panel
                           :items '(a b c d e)
                           :selection 2)))

The following code line returns the selection of the list panel.

(capi:choice-selected-item list)

The selection can be changed, and the change viewed, using the following code.

(setf (capi:choice-selected-item list) 'e)

(capi:choice-selected-item list)

See Also

choice
choice-selected-items


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker