Tree.SetNode

Tree.SetNode ( 

string ObjectName,

string NodeIndex,

table  Data )

Description

Sets the properties of the specified node in a tree object.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node whose properties you want to set.

Data

(table) A table containing node properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text of the current item.

Data

string

The data of the current item.

Selected

boolean

True to select the item, false to not.

Expanded

boolean

True to expand the item, false to not.
Note: Only the current node's items will be expanded, not its sub items. Use Tree.ExpandNode to expand all sub items.

Checked

boolean

True if the item is checked, false if it is not.

Note: If check boxes are not shown in the tree object, this property will be ignored.

ImageIndex

number

The icon index that the current item will use when not selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

SelectedImageIndex

number

The icon index that the current item will use when selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions