A track bar can set integer values on a continuous range. It is useful for adjusting properties like color, volume and brightness. The user moves the slide indicator by dragging it to a particular location or clicking within the bar.
- Use the Max and Min properties to set the upper and lower range of the track bar.
- Use SelEnd and SelStart to highlight a selection range.
- The Orientation property determines whether the track bar is vertical or horizontal.
- By default, a track bar has one row of ticks along the bottom. Use the TickMarks property to change their location. To control the intervals between ticks, use the TickStyle property and SetTick method.
Three views of the track bar component:
- Position sets a default position for the track bar and tracks the position at runtime.
- By default, users can move one tick up or down by pressing the up and down arrow keys. Set LineSize to change that increment.
- Set PageSize to determine the number of ticks moved when the user presses Page Up and Page Down.