All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

choice-selected-item-p Function

Summary

Checks if an item is currently selected in a choice.

Package

capi

Signature

choice-selected-item-p choice item => result

Arguments
choice
A choice.
item
An item.
Values
result
A boolean.
Description

The function choice-selected-item-p is the predicate for whether an item item of the choice choice is selected.

Note that the items are compared by the test-function of choice - see collection for details.

Examples
(setq list 
      (capi:contain 
       (make-instance 'capi:list-panel
                      :items '(a b c d)
                      :selection 2
                      :visible-min-height 
                      '(:character 4))))
(capi:choice-selected-item-p list 'c) 
=>
t

Now click on another item.

(capi:choice-selected-item-p list 'c)
=>
nil
See also

choice
collection


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57