| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: picture-button-or-multi-picture-button
Returns whether a picture-button
will automatically unpress itself
just after the user has pressed it interactively, or whether a multi-picture-button
will
automatically unpress any of its buttons just after that button is
pressed interactively. The default value is nil
, which means that a pressed button will stay
pressed until the user unpresses it explicitly (or presses another
button within a multi-picture-button when its
multiple-selections property is
nil
). The setf of this function may be called to
set the value of this property, or it may be specified when creating
the widget by passing the unpress-automatically
initarg to make-instance.
If the value of this property is true, then when the user presses a button interactively, the button will be unpressed automatically just after the widget's on-change function (if any) has run. The unpressing of the button is therefore a visual indication of when the button has completed its action. The button is unpressed internally by calling initialize-value, and so the on-change function will not be called again as a result of the unpressing.
This property affects only interactive button-pressing, and does not
affect pressing buttons programmatically by calling (setf value). A
button may be pressed interactively either by clicking it or by
pressing the spacebar when the button has the keyboard focus (for a
multi-picture-button
, the
latter requires the draw-focus property to be true).
Setting this property to true is essentially equivalent to returning
(not new-value)
from the on-change function, which would
return nil
to reject the new value when a
button is pressed down, but return true when all buttons are
unpressed. We had suggested that return value in earlier releases,
but that technique was rather obscure.
For a multi-picture-button
,
setting this property to true when the multiple-selections property is
also true is probably not useful, since there would be no way for the
user to press multiple buttons down interactively (though that would
still be possible by calling (setf value).)
;; In the following example, my-multi-picture-button ;; is assumed to be the widget object (rather than, ;; say, the widget name). To test this, you could ;; use the Tools | Get Component command, then click on a ;; multi-picture-button to return it, and then evaluate: ;; (setf my-multi-picture-button *) (setf (unpress-automatically my-multi-picture-button) t)
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |