The image displayed on the button's face.
Usage
Set_Property(OLECtrlEntID, "OLE.Icon", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Image | Formatted String | The full path and file name of the image to be used as the icon | "" |
<2> | Frame Count | Integer | The number of frames in the image | 1 |
Remarks
The Icon property is the image to appear on the button. Refer to the Image documentation for supported file types and image location options.
The icon will always appear to the left of the caption. If there is no caption, the icon is centered in the bottom.
In OpenInsight, you had to supply one image containing several button states to get a custom look and feel.
With the SRP OLE Button control, you specify a single image and the button draws the various states automatically.
When loading the icon image from a bitmap file, be sure to set the TransparentColor property to the color of the bitmap image you wish to be transparent.
Frames
When you supply just one image, the button applies special effects to the image automatically depending upon the button's state. If you wish to have more control over the images used for each state, you may supply muliple frames. For more information, see the topic on Icon States.
Example
// Load the icon from a dll Set_Property(@Window:".OLE_BUTTON", "OLE.Icon", "images.dll#APP_ICON") // Load the icon from a dll dividing the image into 3 frames Set_Property(@Window:".OLE_BUTTON", "OLE.Icon", "images.dll#APP_ICON":@FM:3) // Load the icon from a bitmap file and make magenta transparent Set_Property(@Window:".OLE_BUTTON", "OLE.Icon", "BMPS\MyIcon.bmp") Set_Property(@Window:".OLE_BUTTON", "OLE.TransparentColor", RGB(255, 0, 255))