Working With Trackbar Controls in Desktop Windows Applications

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

Trackbar is a standard Windows control, which allows you to adjust any numeric value within the predefined range. A trackbar usually contains a slider and tick marks that represent numeric information. Each tick mark corresponds to a certain value and you can adjust this value by moving the slider to the position identified by this mark.

To work with Win32 trackbar controls TestComplete uses the Win32TrackBar object. During the test run, TestComplete analyzes the controls’ class names and if the tested control’s class name is found in the Default Project Properties - Object Mapping Options list of the project’s options, associates the Win32TrackBar object with this tested control. You can use specific properties and methods of this object to obtain data and perform various operations over the standard trackbar controls. If you need to test a custom trackbar control, you can add its class name to the Default Project Properties - Object Mapping Options list and use the properties and methods provided by Win32TrackBar.

The topics of this section describe common operations that can be performed over trackbar 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 the Trackbar Slider's Position in Desktop Windows Applications

Explains how to obtain information about the slider's logical position and the available range.

Setting the Trackbar Slider's Position in Desktop Windows Applications

Describes how to adjust the trackbar slider's position.

Determining the Number of Trackbar Ticks in Desktop Windows Applications

Describes how to determine the total number of tick marks in a trackbar control.

Related Topics of Interest

Simulating User Actions

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

See Also

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

Highlight search results