Image handling basics
This is an introduction to image handling in Genero.
Purpose of images in applications
- Application icon for the operating system taskbar / window manager.
- Icons in pop-up messages, menu options, form buttons, toolbars, list elements, treeview nodes.
- Decoration pictures in forms like background images, company logo, etc.
- Application photos, to get a visual identification for objects or people.
Images can be static (like toolbar icons, logos), or can change during the program execution (images related to application data).
In .per form definition files, specify static or dynamic image form items, with the IMAGE item type.
Sources for image data
- An image file located on the system where the program executes (available on the platform, or from your own application).
- An URL (or URI) resource: the image file is located on a Web server and can be downloaded from the internet.
- Image data stored in a database within Binary Large Object (BLOB) typed columns.
- Pictures coming from a mobile device photo gallery, or camera.
In all cases, the image data must be available locally on the front-end platform to be displayed. Since the program can run on a different platform as the front-end, Genero provides several solutions to transmit the image data to the front-end, when the image is not available as a local file. For more details, see Providing the image resource.
Image triggering actions
ACTION
attribute. The associated action handler will then be executed in the
program code, for example to react to mouse clicks on the image for desktop
front-ends:IMAGE i1: logo,
IMAGE = "genero_logo",
ACTION = show_about_box;
For more details about action handling, see Dialog actions.