Progress
AppBuilder
Developer’s Guide
Static Images
Static Image objects have no behavioral repertoire of their own, though you can use them as labels on Pushbuttons and in similar contexts. Consider cultural differences when choosing images, especially when choosing images to use as icons and labels. What is perfectly clear to one person might be mystifying to another, or even offensive. Be especially wary of using visual puns: they almost never translate well.
To create and configure a Static Image element, follow these steps:
- Click on the Image tool icon in the Objects Palette:
![]()
- Move your mouse cursor to a bare spot in your workspace, and click to place the new Image object. Initially, the Image is undefined and looks like a smudged square. Note that it might not look exactly as shown here. Until an image is loaded, you see only the random contents of that area of memory:
![]()
- Select the object and choose Tools
Property Sheet. The dialog box opens:
![]()
Minimal Configuration
At a minimum, you should do these things:
To identify the image file, follow these steps:
- Click on the smudge image. The Choose Image Files dialog box opens:
![]()
- Select the image type desired. AppBuilder supports many different image formats.
- If the image you want to use is not listed, choose the Browse button to move to the correct directory. Select the filename. You will see a preview of the image, if you have the Preview box checked. For the purpose of this example, the image is that of the Objects Palette:
![]()
Note that Preview shows as much of the image as possible, at the size it will appear when the application runs; Progress does not rescale images here. If the image is the wrong size for your purposes, you must use some tool such as a graphics editor to rescale it before use, or must write code to rescale it under program control.
- When you have the correct image file identified, choose OK to return to the property sheet. Some portion of the image—not necessarily the whole thing—appears in place of the smudge, as a token that you have successfully identified the image. The fully qualified filename of the image also appears, for your convenience:
![]()
- Set any other properties you consider appropriate, and choose OK to dismiss the property sheet.
- Drag the handles of the Image object to size and position it. Note that sizing incorrectly does not deform the Image, it clips it:
![]()
Help
You can include a Tooltip string, if you wish. Under MS-Windows, the Image object will display the Tooltip string whenever the user allows the mouse cursor to hover over the image.
Geometry
If you prefer to set the origin and size of the image explicitly rather than interactively, do so here.
Miscellaneous Properties (Other Settings)
There are a few other properties you can change, if the default values do not meet your needs:
- Convert 3D Colors — Normally cleared. Setting this box causes AppBuilder to substitute platform-specific system colors in place of the actual colors in the Image. This often produces an unwelcome effect.
- Enable — Normally set. Clearing this box causes the Image object to decline the input focus when offered.
- Hidden — Normally cleared. Setting this box prevents the object from responding to implicit requests to show itself. You would have to include an explicit request.
- Remove from Layout — Cleared. Cannot be set except when defining an alternate layout.
- Retain Shape — Cleared. Can be set only if the option Stretch to Fit is set. Setting this box causes any stretch operation to maintain the original aspect ratio of the image. Does not apply to images that take the .ico file extension.
- Stretch to Fit — Normally cleared. Setting this box causes the image to be stretched to fit the available space. If Retain Shape is also set, the stretched image will maintain the original aspect ratio, even at the expense of fitting the space. Does not apply to images that take the .ico file extension.
- Transparent — Normally cleared. Setting this box causes the image to clear all its background pixels to a transparent state, thus revealing whatever is underneath them. The image considers any pixel a background pixel if it is the same color as the pixel in its lower-left corner. Does not apply to images that take the .ico file extension.
Advanced Properties
The Static Image object has the normal minimum Advanced Properties. See the "Advanced Properties" section in "Frequently Used Dialogs," for more information.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |