An icon pane's icons.

Usage

Set_Property(OLECtrlEntID, "OLE.Icons[Caption]", Array)

Values

Array is a multivalued dynamic array with the following structure:

PosNameTypeDescription
<0, 1>KeyTextA unique key for the image.
<0, 2>FilePathTextThe image file.
<0, 3>DescriptionTextThe icon's optional description

Indices

IndexDescription
CaptionCaption of an existing icon pane

Remarks

The Icons property defines the icons for a specified pane. Icon panes are created using the Panes property. To target a specific pane, you must pass an existing pane's caption as the index to this property.

The first value of each @FM delimited field is a unique key identifying the icon. Even though you can have any number of icon panes, each icon key must be unique to all other icons in all other panes. This ensures memory is used more efficiently. The sketch will use the key to determine which icon to draw. This allows you to later change the image associated with a certain key, which will in turn change the image that appears in any sketch referencing that key, even sketches that were originally created with the old image.

The second value is the path to the icon's file image. Only a few basic file types are supported, such as BMP, PNG, and JPG. PNG is recommended for non-square images (that is, images with transparency in them).

The third value is an option description of the icon. The description will only appear in the pane. Icon descriptions never appear in the sketch itself.

Example

// Add icons to a pane called Landmarks
Icons = ""
Icons<-1> = "Hiking"   :@VM:"BMPS\Hike.png":@VM:"A place to go hiking"
Icons<-1> = "Shopping" :@VM:"BMPS\Shop.png":@VM:"A place to spend money"
Icons<-1> = "Restrooms":@VM:"BMPS\Rest.png":@VM:"A place to see a man about a horse"
Icons<-1> = "Vistas"   :@VM:"BMPS\Vist.png":@VM:"A place to see another place"
Set_Property(@Window:".OLE_SKETCH", "OLE.Icons[Landmarks]", Icons)

See Also

Panes

  • No labels