wExpanded Property (Specific to Win32TreeView Controls)

Applies to TestComplete 15.70, last modified on December 17, 2024
This property is obsolete. See the Remarks section below.

Description

Use the wExpanded property to determine whether the tree view item specified by the Item parameter is expanded, otherwise it returns False.

Declaration

TestObj.wExpanded(Item)

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

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:

Item

Specifies the path to the desired item. The path should be relative to the current item or to the tree root, respectively. To indicate that the path starts from the tree root, place the pipeline character ( | ) at the beginning of the path.

Each item in the path can be specified by its caption or index; individual captions and indexes must be separated with pipeline characters ( | ). Indexes must be enclosed in brackets - [ and ].

To indicate variable parts of the item caption, you can use the asterisk (*) and question mark (?) wildcards. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.

Note: If the item caption includes a bracket or a pipeline character, address the item by its index or with the question mark wildcard.

Property Value

True, if the specified item is expanded, otherwise - False. The property will also return False, if the specified item has no child items.

If the specified item is not found, the property will return False as well and post an error message to the test log.

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 check whether a tree view item is expanded, use the Expanded 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 wExpanded property in square brackets: wExpanded[Item].

To expand and collapse items, use the ExpandItem and CollapseItem actions. You can also simulate the collapsing and expading usign the Click and DblClick actions.

Example

To view an example that demonstrates how to use the wExpanded property, see Checking Tree View Items' State in Desktop Windows Applications.

See Also

CollapseItem Action (TreeView Controls)
ExpandItem Action (TreeView Controls)
wSelection Property (Specific to Win32TreeView Controls)
Expanded Property (TreeViewItem Objects)

Highlight search results