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

NextPrevUpTopContentsIndex

check-button

Class
Summary

A check button is a button that can be either selected or deselected, and its selection is independent of the selections of any other buttons.

Package

capi

Superclasses

button
titled-object

Description

The class check-button inherits most of its behavior from the class button. Note that it is normally best to use a check-button-panel rather than make the individual buttons yourself, as the button panel provides functionality for handling groups of buttons. However, check-button can be used if you need to have more control over the button's behavior.

Example

The following code creates a check button.

(setq button (capi:contain
              (make-instance 'capi:check-button 
                             :text "Press Me")))

The button can be selected and deselected using this code.

(capi:apply-in-pane-process
 button #'(setf capi:button-selected) t button)
 
(capi:apply-in-pane-process
 button #'(setf capi:button-selected) nil button)

The following code disables and enables the button.

(capi:apply-in-pane-process
 button #'(setf capi:button-enabled) nil button)
 
(capi:apply-in-pane-process
 button #'(setf capi:button-enabled) t button)
See also

push-button
radio-button
button-panel
Button elements


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex