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"
  1. 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).
Note: Action view decoration attributes such as TEXT, IMAGE and COMMENT defined at dialog level with ON ACTION name ATTRIBUTES(...) apply only to default action views. See 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";