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

Returns

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

Example 1

This statement highlights the trackbar values between 30 and 70:

HTrackBar.SelectionRange( 30, 70 )

See also