IMAGE action attribute
The IMAGE
attribute defines the image resource to be displayed
for the action.
Syntax 1 (Dialog action handlers and form action defaults):
IMAGE = "resource"
Syntax 2 (Global .4ad action defaults file):
image = "resource"
- resource defines the file name, path or URL to the image source.
Usage
The IMAGE
attribute is used
to define the image resource for action views such as BUTTON
,
BUTTONEDIT
, or a TOOLBAR
button.
For more details about image resource specification, see Providing the image resource.
This action attribute can be specified as action default attribute
in a global .4ad file, in the ACTION DEFAULTS
section of form
files, as dialog action attribute (using ON ACTION name
ATTRIBUTES(...)
), or directly as action view attribute (in the form definition file).
Action view decoration attributes TEXT
,
IMAGE
and COMMENT
defined at dialog level with ON ACTION
name ATTRIBUTES(...)
apply only to implicit action views
such as default action views, context menu action views and rowbound action views: The
explicit action views (such as buttons in the form layout) will not get dialog-level
attribute values. Note that the COMMENT
attribute will not be rendered on context
menu and rowbound action views. See also Dialog action handler attributes
for more details.
Example
-- As action handler attribute
ON ACTION print ATTRIBUTES(IMAGE="printer")
-- As action default
ACTION DEFAULTS
ACTION print (IMAGE="printer")
END
-- In a form buttonedit or button
BUTTONEDIT f001 = FORMONLY.field01, IMAGE = "zoom";
BUTTON b01: open_file, IMAGE = "buttons/fileopen";
BUTTON b02: accept, IMAGE = "http://myserver/images/accept.png";