SelectionRange

Description

Highlights a range of contiguous values in a trackbar control. The range you select is highlighted in the trackbar channel, with an arrow at each end of the range.

Applies to

Trackbar controls

Syntax

control.SelectionRange ( startpos, endpos )

Argument

Description

control

The name of the trackbar control

startpos

An integer that specifies the starting position of the range

endpos

An integer that specifies the ending position of the range


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Usage

Use this function to indicate a range of preferred values.

In a scheduling application, the selection range could indicate a block of time that is unavailable. Setting a selection range does not prevent the user from selecting a value either inside or outside the range.

Examples

This statement highlights the trackbar values between 30 and 70:

HTrackBar.SelectionRange( 30, 70 )

See also

HTrackBar method for DataWindows in the section called “HTrackBar control” in Objects and Controls

VTrackBar method for DataWindows in the section called “VTrackBar control” in Objects and Controls