You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

An item's multivalue settings.

Usage

Set_Property(OLECtrlEntID, "OLE.Item[key]", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>DataTextThe item's data""
<2>Data Type   
<2, 1>TypeOptionThe item's data type, used to make sorting accurate and efficientText
<2, 2>FormatFormatted StringThe item's data format, used to present the data to the user""
<3>ClassTextThe item's class, an application specific string used for classification purposes""
<4>ImageFormatted StringThe item's image, either a file or a key pointing to a global image""
<5>Colors   
<5, 1>Text ColorColorThe color of the item's textWindowText
<5, 2>BackgroundColor FillThe item's backgroundWindow
<6>FontFontThe font used to render the item's dataTahoma, 8 pt.
<7>Alignment   
<7, 1>HorizontalOptionThe horizontal alignment of the item's dataLeft
<7, 2>VerticalOptionThe vertical alignment of the item's dataCenter
<8>SortOptionThe item's sort settingNone
<9>Check BoxOptionThe item's check box settingNone
<10>ExpandableBooleanWhether or not the item can be expanded or collapsed by the user1
<11>HeightIntegerThe item's height16
<12>HyperlinkBooleanWhether or not the item displays hyperlink feedback to the user0
<13>SelectableBooleanWhether or not the item can be selected by the user1

Indices

IndexDescription

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 ItemTypefor 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.

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

ItemAlignmentItemCheckBoxItemClassItemColorsItemDataItemExpandableItemFontItemHeightItemHyperlinkItemImageItemSelectableItemSortItemType

  • No labels