| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
The class of a picture-button control
Instance of the picture-button
class. This control
contains an icon that may be selected by the user. It is capable of a
non-momentary pressed-in state.
The image that is to appear on a picture-button
(or on a static-picture
) widget
may be specified with any one of the following properties (typically
by passing the equivalent keyword argument such as :pixmap to make-instance when creating
an instance of the widget):
If the :stretching option to make-instance is passed as non-nil, then the bitmapped image will stretch automatically to fit the size of the widget. If nil, it will be drawn at the size at which the image was defined. The default is t. See stretching.
The :cluster entry on the dialog item plist can be used to group picture-button dialog items into clusters. If the user clicks on one button in the cluster, that button will be turned on, and all other buttons in the cluster turned off. For example, consider the following:
(make-instance 'picture-button ... :cluster 'cluster1) (make-instance 'picture-button ... :cluster 'cluster1) (make-instance 'picture-button ... :cluster 'cluster2) (make-instance 'picture-button ... :cluster 'cluster2)
It creates two picture-button clusters each with two picture buttons. :cluster entries are compared using eql.
Using a multi-picture-button
instead of
clusters of picture-buttons will reduce the load on resources and
reduce application size/complexity in most situations. Components are
window-like objects and are relatively costly in terms of system
resources.
This control supports the click-off property. The
:click-off
option to make-instance can have the following values:
nil
: users can only deselect the button by
clicking on another button in the same cluster (or by setting the
value programmatically).
t
: users can deselect the button by clicking
on it again once it has been selected, i.e., the control will toggle
on and off.
Note: :click-off
affects only what happens when
clicking on a button widget while it is selected; the state of the
button can always be changed programmatically by calling (setf
value).
See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.
A diagram of window and widget classes is shown in Widget and window classes in cgide.htm.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |