How to Insert Bitmaps

Previous Next

If you want to include a bitmap (BMP) or icon (ICO) file in a window or dialog, you can simply insert a Bitmap Image, and then specify the filename in the Image property on the Visual tab page of the Property Inspector.

Note that colors displayed by bitmaps may vary depending upon the settings for the monitor that is being used for display. This is a standard feature of non-palette driven color management.

There may also be situations, however, in which you want the picture to depend on certain data (e.g. have a person's name and address accompanied by his/her photograph). To do so, use the Definer to add a column in which end users can enter a filename. Base this column on a domain with, for example, the VARCHAR2 data type, and the CHAR display type. Then use the Windows Designer to define an extra query (e.g. SELECT photo FROM person), and change the Display Type property of this extra query column to Bitmap Image. The window/dialog will then have one field in which the filename can be entered, and one in which the corresponding picture will be displayed.

On Oracle, another possibility is to use the Definer to add a column based on a domain with the LONGRAW (i.e. BLOB) data type, and the Bitmap Image display type. In that case you do not need the Windows Designer to do this.

Note that changing Display Type does not copy Property values. A column consists of two objects, the base column and the displayed column. The display type resource is part of the base column, the group property is part of the displayed column. Changing the display type results in re-creation of the displayed column, being a different object. In general this implies that the resource settings for this new displayed column are different compared to the destroyed displayed column. In other words, you have set the group resource for a specific displayed column, not being the new displayed column. Therefore the new displayed column will not appear in your group, but (by default) in the columnBox.

If you change the display type back to its original form, you will get all the property settings for that display type back again. This way you can copy property values by hand.