wHeader Property (Specific to Win32ListView Controls)

Applies to TestComplete 15.68, last modified on October 03, 2024

Description

Each list-view control may have a header. Use the wHeader property to obtain an object that provides scripting interface to the header. Once you have obtained that object, you can use its methods and properties to simulate user actions over the header.

Declaration

TestObj.wHeader

Read-Only Property A Win32Header object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

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.

Property Value

A Win32Header object or an empty Variant value, if the list-view has no header.

Remarks

To see if the property returns an empty Variant value or a Win32Header object, use the GetVarType built-in routine:

JavaScript, JScript

// Obtains a list-view object
ListViewObj = Sys.Process("MyProcess").Window("MyWindowClass", "MyForm", 0).Window("SysListView32", "", 0);
hdr = ListViewObj.wHeader;
if (aqObject.GetVarType(hdr) == varNull)
  // No header
else
  // The property returns Win32Header object

Python

# Obtains a list-view object
ListViewObj = Sys.Process("MyProcess").Window("MyWindowClass", "MyForm", 0).Window("SysListView32", "", 0);
hdr = ListViewObj.wHeader;
if (aqObject.GetVarType(hdr) == varNull):
  # No header
else:
  # The property returns Win32Header object

VBScript

' Obtains a list-view object
Set ListViewObj = Sys.Process("MyProcess").Window("MyWindowClass", "MyForm", 0).Window("SysListView32", "", 0)
Set hdr = ListViewObj.wHeader
If aqObject.GetVarType(hdr) = varNull Then
  ' No header
Else
  ' The property returns Win32Header object
End If

DelphiScript

// Obtains a list-view object
ListViewObj := Sys.Process('MyProcess').Window('MyWindowClass', 'MyForm', 0).Window('SysListView32', '', 0);
hdr := ListViewObj.wHeader;
if aqObject.GetVarType(hdr) = varNull then
  // No header
else
  // The property returns Win32Header object

C++Script, C#Script

// Obtains a list-view object
ListViewObj = Sys["Process"]("MyProcess")["Window"]("MyWindowClass", "MyForm", 0)["Window"]("SysListView32", "", 0);
hdr = ListViewObj["wHeader"];
if (aqObject["GetVarType"](hdr) == varNull)
  // No header
else
  // The property returns Win32Header object

See Also

Win32Header Object

Highlight search results