TrackBarControl Class
The control that allows end-users to select a value by dragging a small thumb along a scale.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v18.1.dll
Declaration
[SmartTagAction(typeof(TrackBarActions), "EditLabels", "Edit Labels", SmartTagActionType.CloseAfterExecute)]
[ToolboxTabName("DX.18.1: Common Controls")]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "TrackBarControl")]
public class TrackBarControl :
BaseEdit,
IXtraResizableControl,
ISupportInitialize,
IGestureClient
Remarks
An end-user can drag the TrackBarControl‘s thumb to change the control’s value (TrackBarControl.Value or TrackBarControl.EditValue) within a certain value range (RepositoryItemTrackBar.Minimum and RepositoryItemTrackBar.Maximum).
When the user presses the PAGE UP or PAGE DOWN key or clicks the track bar on either side of the scroll thumb, the thumb moves a large distance, specified by the RepositoryItemTrackBar.LargeChange property. If the user presses one of the arrow keys, the thumb moves a small distance, specified by the RepositoryItemTrackBar.SmallChange property. To use the mouse wheel along with the keyboard arrow keys for modifying the editor’s value by a SmallChange amount, use the RepositoryItemTrackBar.SmallChangeUseMode property.
To scroll the track bar in code, set the TrackBarControl.Value property or use one of the following methods: TrackBarControl.MoveBegin, TrackBarControl.MoveLeft, TrackBarControl.MoveLargeLeft, TrackBarControl.MoveLargeRight, TrackBarControl.MoveRight, TrackBarControl.MoveEnd.
The following are the main control features.
Horizontal and vertical orientations (See the RepositoryItemTrackBar.Orientation property).
Tick mark position and frequency can be customized with the RepositoryItemTrackBar.TickStyle and RepositoryItemTrackBar.TickFrequency properties.
- Inverted layout (RepositoryItemTrackBar.InvertLayout).
- Tick mark labels (RepositoryItemTrackBar.ShowLabels and RepositoryItemTrackBar.Labels).
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TrackBarControl class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.