NextPrevUpTopContentsIndex

4.5.1 Push buttons

You have already seen push buttons in earlier examples. The :enabled keyword can be used to specify whether or not the button should be selectable when it is displayed. This can be useful for disabling a button in certain situations.

The following code creates a push button which cannot be selected.

(setq offbutton (make-instance 'push-button
                   :data "Button"
                   :enabled nil))
(contain offbutton)

These setf expansions enable and disable the button:

(apply-in-pane-process
 offbutton #'(setf button-enabled) t offbutton)
 
(apply-in-pane-process
 offbutton #'(setf button-enabled) nil offbutton)

All subclasses of the button class can be disabled in this way.


LispWorks CAPI User Guide (Unix version) - 17 Mar 2008

NextPrevUpTopContentsIndex