Position

Applies to

HProgressBar, VProgressBar, HScrollBar, VScrollBar, HTrackBar, VTrackBar controls

Description

Position specifies where the scroll box or slider appears when the scroll bar or track bar is first displayed at runtime. For a progress bar, Position specifies the value of the current position within the range of the control (set with the SetRange function). The control uses the range and the current position to determine the percentage of the progress bar to fill with the highlight color.

Usage

In a painter

To set the initial position of the progress indicator, scroll box, or slider:

  • Type a number that is between the values you have specified in MinPosition and MaxPosition.

In scripts

The Position property takes an integer value. It must be used in conjunction with MaxPosition and MinPosition.

For example, if a vertical scroll bar's minimum is 0 and maximum is 100, this statement positions the scroll box 80 percent of the way toward the bottom:

vsb_1.Position = 80