Form specification files / Form item attributes |
The IMAGE attribute defines the image resource to be displayed in the form item.
IMAGE = "resource"
The IMAGE attribute is used to define the image resource to be displayed form items such a BUTTON , BUTTONEDIT, a TOOLBAR button or a static IMAGE item.
The resource string can be one of the following:
It is recommended that you use simple image file names without the file extension, and define the FGLIMAGEPATH environment variable to centralize image files on the application server in a directory created specifically for images. For portability reasons, use .png or .svg image file formats only.
Suffix (case insensitive) | Front-ends supporting the file format |
---|---|
.BMP | GDC, GWC |
.GIF | GDC, GWC |
.ICO | GDC, GWC |
.JPG | GDC, GWC |
.PNG | GDC, GWC |
.SVG | GDC, GWC |
.TIFF | GDC, GWC |
If the image specification is a simple string without an URL or URI prefix, it is identified as a file path. The file is first sought in the picture directory on the client workstation. According to the front-end type, this local directory can actually be on a remote machine where the GAS middle-ware component is located. If the file is not found, the front-end automatically sends an image request to the runtime system, in order to search for an image on the server where the programs are executed. The runtime system searches for server-side images by using the FGLIMAGEPATH environment variable. If FGLIMAGEPATH is not set, the image files are searched in the current working directory.
When setting FGLIMAGEPATH , the runtime system will only transfer files found in the directories listed in that environment variable. You can still use absolute or relative paths in the image file names, but the files must be located below one of the directories listed in FGLIMAGEPATH. For maximum security, put the image files in directories that contain only image files, and keep critical data or program file in separate directories.
Images displayed by the program to IMAGE fields do not follow the FGLIMAGEPATH security restriction. Image fields do not use the IMAGE attribute. For these fields, the image is specified in the field value.
If the image specification starts with a URL prefix, the front-end will try to download the image from the location specified by the URL.
Image resource location (URL) | Description |
---|---|
http://location-specification | HTTP server |
https://location-specification | HTTPS server (HTTP over SSL) |
ftp://location-specification | FTP server |
BUTTONEDIT f001 = FORMONLY.field01, IMAGE = "zoom"; BUTTON b01: open_file, IMAGE = "buttons/fileopen"; BUTTON b02: accept, IMAGE = "http://myserver/images/accept.png";