Determines the role of tree items, and specifies the icons that are used to represent these tree items at run time.



Physical Property Name TYPE
Property Type string
Dynamic? Yes
Default value N/A


The Type property is a Gold-separated string defining the name and properties of a tree item type. It has the following syntax:

Type ; Node ; StateIcons

  • Type—specifies the name of the tree item type in the following format:

    TYPEN = TypeName

    • TypeName—any string that does not contain subfield separators
    • N—integer that is incremented sequentially for each unique occurrence of item type
  • Node—indicates whether the tree item is a node or leaf.

    NODEN = T | F

    If NODEn =T, the tree item is a node. If NODEn=F, the tree item is a leaf

  • StateIcons—specifies the icon to use when the tree item has a specific state; consists of a GOLD ; separated list containing the state value and icon name, as follows:

    NORMALN = ImageName ; SELECTEDN = ImageName ; OPENIDN = ImageName ; OPENSELECTN = ImageName

    • Normal—specifies the image to use when the item is not open and not selected; mandatory.
    • Selected—specifies the image to use when the item is selected in the List View (if specified).
    • Open—specifies the image to use when the item is open in the Tree View, but not selected; valid only Node=T.
    • OpenSelect—specifies the image to use when the item; valid only Node=T.
    • ImageName—name of a bitmap or glyph.

State Icons

For best results follow the convention used in Microsoft Windows Explorer, which uses the same icon for Normal and Selected (a closed folder, for example) and another icon for Open and OpenSelect (an open folder, for example).

The width, height, and color-depth of all icons are determined by the image specified in the widget’s NORMAL1 property value. Any other icon that does not conform to these three values is discarded and will not be used in the widget.

If no other icons are specified, the icon for Normal state is used. If an icon is specified for Normal and for Selected, but not for Open, the Select icon is used.

When using PNG files as icons, image transparency is not supported.

Applies To

utree (Tree)

$properties(TREFLD) = "%%$1%%%;%%$2"