Ribbon for WinForms | ComponentOne
Elements / Ribbon Items / Time Picker
In This Topic
    Time Picker
    In This Topic

    The Time Picker works like a numeric box with increment and decrement buttons. It enables the user to choose a specific time or enter a specific time in the numeric box.

    Timepicker

    Adding Time Picker at Design-Time

    The Ribbon TimePicker 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 TimePicker using the Ribbon TimePicker 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 TextBox.

    Floating toolbar

    Adding Time Picker through Code

    A TimePicker can also be added to the C1Ribbon control through the code using the RibbonTimePicker class. This is depicted in the code below:

    ' Add TimePicker
    Dim timePicker As RibbonTimePicker = New RibbonTimePicker()
    timePicker.Label = "Select Time:"
    formatGroup.Items.Add(timePicker)
    
    // Add TimePicker
    RibbonTimePicker timePicker = new RibbonTimePicker();
    timePicker.Label = "Select Time:";
    formatGroup.Items.Add(timePicker);