Language Reference Guide : System Classes : BitmapObject Class : FileHandle Attribute
 
Share this page          
FileHandle Attribute
Data Type: varchar(256)
4GL Access: RW
The FileHandle attribute identifies an external file containing a bitmap.
When you set this attribute to the file name, OpenROAD associates the bitmap in the file with the BitmapObject object and automatically displays the bitmap if the bitmap object is currently displayed in an ImageField. To update the image in a palette field, you must then call the UpdChoiceList method.
The file format must have one of the following formats:
XBM
Specifies portable X black and white
GIF
Specifies GIF format, in black and white or color
RAST
Specifies Sun raster format, for color or black and white
BMP
Specifies .BMP format
ICO
Specifies .ICO icon format
JPG
Specifies JPEG format
TIFF
Specifies TIFF format
CUR
Specifies .CUR format
PNG
Specifies .PNG format. When reading a PNG format file into a BitmapObject:
Grayscale (1-, 2-, 4-, 8-, and 16-bit) images are converted to 24-bit RGB.
Indexed 8-bit images are unchanged. Other indexed images (1-, 2-, and 4-bit) are converted to 24-bit RGB.
8- and 16-bit-channel RGB images maintain their color type (RGB), but 16-bit channels are scaled down to 8-bit channels with minimal image color degradation. OpenROAD does not currently support 16-bit channels.
RGBA format files remain 32-bit RGBA with an alpha channel compositing transformation applied.
If you set the FileHandle attribute to an empty or null string, OpenROAD clears any existing bitmap from the bitmap object and, consequently, from the display if the bitmap was displayed. If you set FileHandle to an invalid file name or a file that does not exist, OpenROAD generates an error message and removes the bitmap object.
For a discussion of using this attribute, see the Programming Guide.
If the BitmapObject is attached to a FormField or a stored TaggedValue Item, using this in your program during development may change your frame's source definition. See BitmapObject Attributes and Methods Affecting the Frame Source (see BitmapObject Class).