| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
The class of a static-picture control.
An instance of the :static-picture class. This control displays an icon which may not be changed by the user. It can act like a button; it may be set to receive mouse clicks via the on-click event handler.
The image that is to appear on a static-picture (or on a picture-button
) 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):
The pixmap-alist property of a
static-picture
may be set
to an association list that maps arbitrary application values to
pixmaps that represent them. Then whenever the value property of the widget is set to one of
those application values, the associated pixmap will be displayed.
And if the widget's user-modifiable property is true, then the user
will be able to cycle through the pixmaps by clicking the widget or
pressing the spacebar when the widget has the keyboard focus;
selecting a new pixmap will set the value property of the widget to be the
associated application value. See pixmap-alist for the format of the association
list.
Resizing a static-picture may mean that an aliasing (jaggies) problem appears in the pixmap. Go back to the program that created the graphic and re-save it at a higher resolution or a larger image size if you encounter this problem.
The stretching property: if the :stretching option 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.
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 |