image_button
A DCL image_button component represents a drawable button. A DCL
image_button can be clicked or double clicked. Just like an image
component, it can be used to draw a vector, a slide or a rectangle
using the respective functions vector_image, fill_image and
slide_image.
To draw anything on an image or image_button, use this sequence:
- call the function start_image
- make a sequence of calls to vector_image, fill_image and
slide_image
- finish by calling end_image
A DCL image is a child tile.
related attributes
- This attribute is valid only for an image_button, edit_box or
list_box:
-
- allow_accept
- When an image_button has the attribute
allow_accept with value true, double clicking on the image_button
or hitting enter when the image_button has focus will trigger the
default button of the dcl dialog.
- These attributes are valid for every child tile and
consequently for an image_button as well:
-
- These attributes are valid for every tile and consequently for
an image_button as well:
-
- key
- value
- Setting the value of an image or
image_button will draw the specified text on top of the
component.
- tooltip
label
- Setting the label of an image or
image_button makes no sense.
- fixed_height
- fixed_width
- alignment
- width
- bcad_width
- height
- bcad_height
- is_enabled
callbacks
- When the left mouse button is pressed
down on an image_button, or by hitting enter when the image_button
has focus, a callback with reason CBR_SELECT will be sent.
- When double clicking an image_button,
a callback with reason CBR_DOUBLE_CLICK will be sent.
- When an image_button has the allow_accept attribute, a
callback will be triggered with the ok button as sender by hitting
enter when the image_button has focus or by double clicking the
image_button. If no ok button has been defined, done_dialog will be
called. The ok button callback happens in addition to the normal
CBR_SELECT or CBR_DOUBLE_CLICK callback of the image_button.