The list of icons to appear on the button's surface.
Usage
Set_Property(OLECtrlEntID, "OLE.IconList", StringValue)
Values
StringValue can be any string meeting the following format requirements:
Syntax: @FM delimited list of icons
Default: ""
Remarks
The IconList property adds unique functionality to the SRP Button Control. The Icon property is useful for adding a single centered icon, which meets most basic needs. The IconList property allows you to place any number of icons aligned as you see fit.
The IconList property is an @FM delimited list of icons. Each field is multivalued with the following structure:
Pos | Name | Type | Description |
---|---|---|---|
<1, 1> | Icon | Formatted String | The icon |
<1, 2> | Horizontal Alignment | Formatted String | Horizontal alignment of the icon |
<1, 3> | Vertical Alignment | Formatted String | Vertical alignment of the icon |
Icon
The Icon value points to the image file you wish to use as your icon. The Icon value is composed of three subvalues:
Pos | Name | Type | Description |
---|---|---|---|
<1, 1, 1> | Image | Formatted String | The image file to load |
<1, 1, 2> | Frame Count | Integer | The number of frames in the image |
<1, 1, 3> | Transparent Color | Formatted String | The color not to render |
The Image subvalue points to the path and filename of the image you wish to use as your icon. Usually, this is the only piece of information needed, but there are two more subvalues for more complex images.
The Frame Count subvalue can be used to divide the image into equal frames, which are used according to the button's state. For complete details on how frames are used in the SRP Button Control, see the Icon States topic.
The Transparent Color subvalue is used to determine which color of the bitmap is not to be rendered. This applies to any image type that does not have transparency built in. (GIF and PNG files have transparency built in, BMP files do not.) You can use NONE to force all pixels to be rendered or AUTO (the default) to hide all pixels that match the top left pixel. Lastly, you can specify the exact color to be transparent using the RGB function.
Alignment
The Horizontal Alignment and Vertical Alignment values are especially formatted for flexibility. For simple alignment, set the horizontal alignment to L, C, or R for Left, Center, or Right alignment respectively. Likewise, set the vertical alignment to T, C, or B for Top, Center, or Bottom respectively.
For additional precision, you can append a numerical offset to the alignment value. For example, setting the horizontal alignment to "L10" means you want the icon left aligned and offset 10 pixels to the right. To offset from the right or bottom, use negative numbers. For example, "B-10" indicates you want the icon bottom aligned and offset 10 pixels up.
Ideas on Customizing Captions and Icons
For more information and ideas regarding caption and icon lists, see the CaptionList and IconList topic.
Example
// Set a button with a different image in opposite corners IconList = "" IconList<1> = "Hello":@VM:"L":@VM:"T" IconList<2> = "World":@VM:"R":@VM:"B" Set_Property(@Window:".OLE_BUTTON", "OLE.IconList", IconList)