Kbase P46332: How to setup up UIB to work with images and icons
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/10/2003 |
|
Status: Unverified
GOAL:
How to setup up UIB to work with images and icons
FIX:
Customers who use UIB generated procedures and work with images may experience a problem that references to image files are hardcoded with an absolute path.
An absolute path may cause a problem during development and deployment.
When a file is loaded into UIB on a different machine an error like is displayed:
The file (<dir>\<name>) for LOAD-IMAGE-UP on the BUTTON widget is invalid in the current system. (206)
After deploying the code, customers may see:
Unable to find image file for <widget>. (2289)
It's possible to set up UIB to use a relative path to reference images
The problem with an absolute path occurs only if a Browse... button is used in a Choose Image Files dialog, or an entry contains a full path.
By default only adeicon subdirectory of %DLC%/gui is available in the Choose Image Files dialog. If you want to have different directories available, use Edith Path... button and type a directory path you want The entered path is concatenated with entries in PROPATH and it's verified that the directory exists. Do not use a full path!
Example: Images are in D:\appl\images directory
1) modify PROPATH to contain an entry D:\appl
2) from Choose image files dialog select "Edith Path..." button and
type images, !!! do not use full path like d:\appl\images!!!
3) select the directory from a Directory combo-box - you should see
bmp and ico files from this directory.
If you select an image, only a relative path like "images\myimage.bmp" is used. You can check the result from UIB -> Compile -> Code Preview
To access Choose Image Files dialog, double-click on an image, button etc widgets to open Property sheet and click on Image button(s) there
Do not modify .w files outside UIB.