wGroups Property (Specific to Win32 ListView Controls)

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

The items of the list-view control can be organized into several groups. Use the wGroups property to obtain a group by it’s index or identifier. To obtain a group to which the item belongs use the wGroup property. To get the number of groups use the wGroupCount property.

Declaration

TestObj.wGroups(Group, By Index)

Read-Only Property A Win32ListView object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Group [in]    Required    Integer    
By Index [in]    Optional    Boolean Default value: True   

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 parameters:

Group

Specifies the identifier or index (zero-based) of the desired group depending on the ByIndex value: if ByIndex is True, TestComplete treats the Group value as the group index; if ByIndex is False, TestComplete treats the Group value as an identifier.

Note: In Windows XP and Windows Server 2003, you can only specify the desired group by its identifier. In Windows Vista, Windows Server 2008 and later, you can address list view groups both by indexes and identifiers.

By Index

Specifies whether the Group parameter specifies the identifier or index of the item.

Property Value

A Win32ListViewGroup object that contains the group information.

If the specified group is not found in the list-view, wGroups returns an empty value (Nothing in VBScript, null in JavaScript, JScript, C++Script and C#Script, None in Python and nil in DelphiScript) and posts an error message to the test log.

Remarks

If you use Python or DelphiScript, you should enclose the parameters of the wGroups property in square brackets: wGroups[Group, ByIndex].

Example

To view an example that demonstrates how to use the wGroups property, see Working With List View Groups in Desktop Windows Applications.

See Also

Working With List View Groups in Desktop Windows Applications
Win32ListViewGroup Object
wGroup Property (Specific to WIn32 ListView Controls)
wGroupCount Property (Specific to Win32ListView Controls)

Highlight search results