An item's multivalue settings.
Usage
Set_Property(OLECtrlEntID, "OLE.Item[key]", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Data | Text | The item's data | "" |
<2> | Data Type | |||
<2, 1> | Type | Option | The item's data type, used to make sorting accurate and efficient | Text |
<2, 2> | Format | Formatted String | The item's data format, used to present the data to the user | "" |
<3> | Class | Text | The item's class, an application specific string used for classification purposes | "" |
<4> | Image | Formatted String | The item's image, either a file or a key pointing to a global image | "" |
<5> | Colors | |||
<5, 1> | Text Color | Color | The color of the item's text | WindowText |
<5, 2> | Background | Color Fill | The item's background | Window |
<6> | Font | Font | The font used to render the item's data | Tahoma, 8 pt. |
<7> | Alignment | |||
<7, 1> | Horizontal | Option | The horizontal alignment of the item's data | Left |
<7, 2> | Vertical | Option | The vertical alignment of the item's data | Center |
<8> | Sort | Option | The item's sort setting | None |
<9> | Check Box | Option | The item's check box setting | None |
<10> | Expandable | Boolean | Whether or not the item can be expanded or collapsed by the user | 1 |
<11> | Height | Integer | The item's height | 16 |
<12> | Hyperlink | Boolean | Whether or not the item displays hyperlink feedback to the user | 0 |
<13> | Selectable | Boolean | Whether or not the item can be selected by the user | 1 |
Indices
Description | |
---|---|
Index | key An item's unique key |
Remarks
The Item property gets and sets multiple attributes of an item at once. This property is useful if you plan to alter many elements of an item at the same time. Each field of this large multivalue structure is detailed below.
Data
This field sets the item's data. The data is the text that is displayed to the user. Usually, this is just simple text, but you can display other kinds of data as well by modifying the next field. See ItemData for details.
Data Type
The data type field establishes the type of data and its output format. The first value of this field sets the data type and the second value determines how that data type is formatted. The data type will be used to determine how the items are sorted, since sorting dates is different than sorting strings. See ItemType for details.
Class
This field sets the item's class. The class is simply a mechanism for classifying items, and the data you put here can be anything you deem appropriate. Think of it as a generic label. For example, you might have item whose data is "Maple" while setting its class to "Tree". This property becomes extremely useful when using Conditions. See ItemClass for details.
Image
The image field establishes the item's image, that is, the icon that appears next to the item's data. You can set this field to an actual image file, or just set it to a key that points to a global image. See the ItemImage property for details.
Colors
This two-part field sets the item's colors. The first value sets the text color and the second value sets the item's background. The text can be any valid Color value while the background utilizes the powerful Color Fill technology. See ItemColors for details.
Font
This field sets the font used to render the item's data. See the Font documentation for more details on its multivalued structure. See ItemFont for details.
Alignment
The alignment field has two values for justifying the data. The first value aligns the data horizontally and can be set to "Left", "Center", or "Right". The second value aligns the data vertically and can be set to "Top", "Center", or "Bottom". See ItemAlignment for details.
Sort
The sort field sets the item's persistent sort setting. Set this to "None", "Ascending", or "Descending". See ItemSort for details.
Check Box
This field determines if a check box should appear next to the item. You can set this field to "None", "Left", or "Right". See ItemCheckBox for details.
Expandable
The expandable field establishes whether or not the item can be expanded or collapsed by the user. If disabled, then no expansion button will appear next to the item. See ItemExpandable for details.
Height
The height field sets the item's height, in pixels. By default, items are 16 pixels high. Use this field to customize the height. See ItemHeight for details.
Hyperlink
This field determines whether or not the item will react like a hyperlink when the user hovers over it. When enabled, the cursor changes to a hand and the data is underlined. See ItemHyperlink for details.
Selectable
This field establishes whether or not the item can be selected by the user. Disable this if you don't want the user to select the item for any reason. See ItemSelectable for details.
Example
// Convert an item into a non-selectable blue hyperlink // In this example, the item's key is "Link" Item = Get_Property(@Window:".OLE_TREE", "OLE.Item[Link]") Item<5, 1> = "Blue" ;// Make it blue Item<12> = 1 ;// Make it a hyperlink Item<13> = 0 ;// Make it non-selectable * Set the item's new attributes Set_Property(@Window:".OLE_TREE", "OLE.Item[Link]", Item)
See Also
ItemAlignment, ItemCheckBox, ItemClass, ItemColors, ItemData, ItemExpandable, ItemFont, ItemHeight, ItemHyperlink, ItemImage, ItemSelectable, ItemSort, ItemType