Ribbon for WinForms | ComponentOne
Elements / Ribbon Items / Track Bar
In This Topic
    Track Bar
    In This Topic

    The Track Bar is a horizontal slider that enables the user to select values on a bar by moving the slider. The tick marks are spaced at regular intervals called the tick frequency. The user can set the Maximum and Minimum values on the TrackBar.

    The GIF below shows the Ribbon TrackBar in a ribbon application.

    Trackbar

    Adding TrackBar at Design-Time

    The Ribbon TrackBar can be added at design-time using the Ribbon Group Floating Toolbar or RibbonGroup Items Collection Editor. Also, you can customize the look of the Ribbon TrackBar using the Ribbon TrackBar Floating ToolBar or by editing the properties in the Properties Window. For more information about floating toolbars, refer this topic

    The image below depicts the floating toolbar of Ribbon TrackBar.

    Floating Toolbar

    Adding TrackBar via Code

    The TrackBar can also be added programmatically to the Ribbon control using the RibbonTrackBar class. This is depicted in the code below:

    ' Add TrackBar 
    Dim trackBar As RibbonTrackBar = New RibbonTrackBar()
    trackBar.Minimum = 10
    trackBar.Maximum = 100
    trackBar.Value = 30
    trackBar.TickFrequency = 10
    formatGroup.Items.Add(trackBar)
    
    // Add TrackBar 
    RibbonTrackBar trackBar = new RibbonTrackBar();
    trackBar.Minimum = 10;
    trackBar.Maximum = 100;
    trackBar.Value = 30;
    trackBar.TickFrequency = 10;
    trackBar.Width = 200;
    formatGroup.Items.Add(trackBar);