Non-
nil
if the option pane is enabled.
An integer specifying the maximum length of the drop-down menu, or the symbol
:default
.
The class
option-pane
provides a pane which offers a choice between a number of items via a drop-down menu. Only the currently selected item is displayed.
The class
option-pane
inherits from choice, and so has all of the standard choice behavior such as selection and callbacks. It also has an extra
enabled
slot along with an accessor which is used to enable and disable the option pane.
If visible-items-count is an integer then the drop-down menu is no longer than this, and is scrollable if there are more items.
If
visible-items-count
is
:default
, then the drop-down menu is no longer than 10. This is the default value.
This example sets the selection and changes the enabled state of an
option-pane
:
(setq option-pane (capi:contain
(make-instance 'capi:option-pane
:items '(1 2 3 4 5)
:selected-item 3)
:process nil))
(setf (capi:choice-selected-item option-pane) 5)
(setf (capi:option-pane-enabled option-pane) nil)
(setf (capi:option-pane-enabled option-pane) t)
This example illustrates the use of visible-items-count :
(capi:contain
(make-instance 'capi:option-pane
:items
(loop for i below 20 collect i)
:visible-items-count 6))
There is a further example in the file
examples/capi/choice/option-pane.lisp
.