Expand Action (TreeList Controls)

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Depending on the Expand parameter, the Expand action either expands or collapses the specified row. The effect is the same as if you clicked the “+” (or “-”) button of the row. However, the Expand action does not move the mouse pointer.

Declaration

TestObj.Expand(Row, Expand)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Row [in]    Required    Integer    
Expand [in]    Optional    Boolean Default value: True   
Result None

Applies To

The method is applied to the following objects:

View Mode

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

Parameters

The method has the following parameters:

Row

Specifies the zero-based index of the desired data row. The first visible row has index 0, the second - 1, and so on. The index of the last visible row is wRowCount - 1.

Expand

Specifies whether to expand or to collapse the row.

Result Value

None.

Remarks

If the specified row is not found, Expand fails and posts an error message to the log.

The script recorder recognizes mouse clicks on the “+” buttons within rows, and records the Expand command.

To collapse the row, you can either call the Collapse action or call Expand with the Expand parameter set to False.

See Also

Collapse Action (TreeList Controls)

Highlight search results