
3.5 Miscellaneous button elements
: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:(setf (button-enabled offbutton) t)All subclasses of the(setf (button-enabled offbutton) nil)
button class can be disabled in this way.

Generated with Harlequin WebMaker