wItem Property (Specific to Win32TreeView Controls)

Applies to TestComplete 14.70, last modified on April 22, 2021
This property is obsolete. See the Remarks section below.

Description

A tree view item (or node) can hold several child items. The wItem property returns the text of the specified child item of the currently selected tree view item. To get the caption of the selected node itself, use the wSelection property.

Declaration

TestObj.wItem(Index)

Read-Only Property String
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Index [in]    Required    Integer    

Applies To

The property is applied to the following object:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The property has the following parameter:

Index

Specifies the zero-based index of the desired child item. For example, the first child item has an index of 0, the second - 1, and so on. The index of the last child item is wItemCount-1.

Property Value

The text of the specified child item.

Remarks

The property is obsolete. It is supported for backward compatibility only. It is displayed neither in the Code Completion window nor in the Object Browser. To get the text of the desired tree view item, use the Text property of the TreeViewItem object that provides access to the corresponding tree view item.

If you use Python or DelphiScript, you should enclose the parameter of the wItem property in square brackets: wItem[Index].

If there is no selected item in the tree view, wItem acts like wRootItem, that is, it returns the text of a root item specified by the index.

Example

To view an example that demonstrates how to use the wItem property, see Checking Tree View Items' State.

See Also

wItemCount Property (Specific to Win32TreeView Controls)
wItems Property (TreeView Controls)
wRootItem Property (Specific to Win32TreeView Controls)
wSelection Property (Specific to Win32TreeView Controls)

Highlight search results