Static images

Describes how to decorate forms with icons.

Static image usage context

Static images are application pictures that do not change during program executing, like icons in toolbar buttons and window icons.

Static images can be defined in different contexts withing form definition, or configuration files:
  • Global application icon for platform window managers (taskbars), by using the ui.Interface.setImage method. The recommendation for mobile devices is that the application icon is provided in the installation package (.apk for Androidâ„¢, .ipa for iOS).
  • Window specific icons, with the IMAGE attribute in the LAYOUT definition of a form (recommended) or at runtime, with the ui.Window.setImage method (if it must be changed during program execution).
  • As default icon for action views, with the IMAGE action configuration attribute (in action defaults for example).
  • As specific action view icons, directly in the form item definition with the IMAGE attribute (for toolbars, menu items, buttons, buttonedits, etc).
  • Image form items (logos), defined by the IMAGE item-tag : item-name syntax, using the IMAGE attribute.
  • Default treeview node icons, with the IMAGEEXPANDED, IMAGECOLLAPSED, IMAGELEAF attributes of a TREE container.

Static image examples

The following code example, defines an ITEM toolbar element using a icon, that is specified with the IMAGE attribute:
TOOLBAR
   ITEM print ( TEXT="Print", IMAGE="printer" )
Next example defines a BUTTONEDIT form field with an icon named "listchoice":
ATTRIBUTES
BUTTONEDIT f05 = customer.cust_city,
    ACTION=get_city,
    IMAGE="listchoice",
    ... ;