Description
Like a scrollbar, a trackbar is used as a scrolling control, but clicking on the slider moves it in discrete increments instead of continuously. Typically a horizontal trackbar has a series of tick marks along the bottom of the channel and a vertical trackbar has tick marks on the right.

Use a trackbar when you want the user to select a discrete value. For example, you might use a trackbar to enable a user to select a timer interval or the size of a window.
Usage
Select the HTrackBar control or the VTrackBar control from the Insert menu or the Controls dropdown toolbar to add a trackbar control to a window. You can set properties such as minimum and maximum values, the frequency of tick marks, and where tick marks display.
You can highlight a range of values in the trackbar with the SelectionRange function. The range you select is indicated by a black fill in the channel and an arrow at each end of the range. This is useful if you want 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.

Properties
Trackbar properties include the following:
|
Property
|
Data type
|
Description
|
|
Slider
|
Boolean
|
Specifies whether or not the trackbar contains a slider
|
|
LineSize
|
Integer
|
Specifies how far the slider moves in response to keyboard input from the arrow keys
|
|
PageSize
|
Integer
|
Specifies how far the slider moves in response to keyboard input from the PageUp or PageDown keys or the mouse. When PageSize is set to 1 the slider moves 1 increment in the range of values
|
|
SliderSize
|
Integer
|
Specifies the size of the slider on the trackbar
|
|
TickMarks
|
HTickMarks or VTickMarks
|
Specifies where the tickmarks should be. TickMarks is an enumerated type: top!, bottom! (for HTrackBar), left!, right! (for VTrackBar), both! or none!
|
Functions
Trackbar functions include the following:
|
Function
|
Description
|
|
SelectionRange
|
Sets the upper and lower limits of a range to be highlighted and marked with arrows. The user's ability to select a position within the range is not affected
|
|