An item's swatch color.

Usage

Set_Property(OLECtrlEntID, "OLE.ItemSwatchColor[key]", ColorFill)

Values

ColorFill can be any Color Fill value.

Indices

IndexDescription
keyAn item's unique key

Remarks

The ItemSwatchColor property establishes whether or not there is a swatch in the item. A swatch is a patch of color either before or after the text. It can be used to turn the tree control into a type of legend, in which an item is associated to a color. By default, this property is set to "None" and no swatch appears. However, you can set this property to any Color Fill value to make it appear. It's position relative to the item's text is not determined in this property, but in the ItemSwatchPosition property

Example

// Add a red gradient swatch to item 1 
Color = "Vertical(Gradient(Red L+=20, Red L-=10), Border(Red L-=20))" 
Set_Property(@Window:".OLE_TREE", "OLE.ItemSwatchColor[Item1]", Color)

See Also

ItemItemSwatchPositionItemSwatchSize

  • No labels