ClassPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

picture-button

Class

The class of a picture-button control

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):

Further notes

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.

Grouping picture-buttons in clusters

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.

Component overhead and clusters of picture-buttons

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.

Using click-off with picture-button controls

This control supports the click-off property. The :click-off option to make-instance can have the following values:

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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version