Working With Header Controls

Applies to TestComplete 15.10, last modified on December 15, 2021

Header controls are usually divided into several parts each having a caption. The captions are displayed above the appropriate columns. Header label parts separate columns, allow you to set their width and sort the content.

To obtain data and perform various actions over the tested header control, you can use a set of specific properties and methods of the Win32Header object. TestComplete associates this object with standard Windows header controls whose class names are listed in the Default Project Properties - Object Mapping Options options of the current project. If you add a custom header’s class name to the Default Project Properties - Object Mapping Options list, it will be associated with Win32Header as well, so you can use specific properties and methods of this object to work with custom header controls. In addition, if the tested application is an Open one, you can access the internal methods and properties of the header control and use them in your tests. You can explore the tested header control in the Object Browser to learn which properties and methods are available for your tests.

The topics of this section describe common operations that can be performed over header controls.

Note: Though the following topics deal with scripts, you can use the same approaches while testing an application from your keyword tests. For more information, see Keyword Tests Basic Operations.

In This Section

Getting Header Items

Describes how you can obtain a needed item.

Getting Header Items' Images

Describes how to work with images associated with header items.

Determining Header Items' Format Settings

Explains how to obtain information about header items’ format settings.

Sorting Content

Explains how you can sort the contents of text columns that correspond to header items from your tests.

Determining the Number of Header Items

Explains how to obtain the total number of header control items.

Determining Header Items' Bounds

Contains information on how to obtain an item's bounds.

Changing Header Items' Width

Describes how you can change the width of header items.

Working With Owner-Drawn Headers

Describes the specifics of working with working-with-owner-drawn header controls.

Related Topics of Interest

Simulating User Actions

Explains the approaches used for simulating user actions over applications’ controls.

See Also

Win32 Header Support
Object-Specific Tasks
Supported Controls
Default Project Properties - Object Mapping Options

Highlight search results