ComponentOne Ribbon for WinForms
C1Ribbon (Classic) Task-Based Help / Adding Ribbon Items / Adding a Tab to the Ribbon
In This Topic
    Adding a Tab to the Ribbon
    In This Topic

    To add a tab to the Ribbon, you can use the smart designer, collection editor, or add code. Each option is described below. To learn how to add a contextual tab, see Adding a Contextual Tab to the Ribbon.

    Add a Ribbon Tab Using the Smart Designer

    Complete the following steps:

    1. Using your mouse pointer, hover over the Ribbon and click the smart designer tag . This enables Ribbon floating toolbar:
    2. From the Ribbon floating toolbar, click the Actions drop-down button.
    3. Select Add Tab. This adds a new tab to the Ribbon.
    4. To edit the label, click the Tab text so that it is highlighted. Enter a new Tab name, for example, Write.
    5. Press ENTER or click outside the editing box to accept the change.
    6. Next, build on the tab by adding a group to the Ribbon tab.

    Add a Ribbon Tab Using the RibbonTab Collection Editor

    Complete the following steps:

    1. Select the Ribbon to activate it.
    2. From the Ribbon's Properties window, select the Tabs property and click on the ellipsis button next to the (Collection).

      The RibbonTab Collection Editor appears.
    3. From the collection editor, click the Add button. A new tab is added to the Ribbon; the new tab is listed in the collection editor's Members list.

      With the new RibbonTab highlighted, you can edit the properties through the Properties list.
    4. Locate the Text property from the Properties list, and change the text to Write.
    5. Click OK to close the collection editor.

    Add a Ribbon Tab Programmatically

    To add a Ribbon tab, add the following code to your project:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    ' Add a tab to the Ribbon
    Dim RibbonTab2 As RibbonTab = New RibbonTab()
    ' Label the tab
    RibbonTab2.Text = "Write"
    C1Ribbon1.Tabs.Add(RibbonTab2)
    

    To write code in C#

    C#
    Copy Code
    // Add a tab to the Ribbon
    RibbonTab RibbonTab2 = new RibbonTab();
    // Label the tab
    RibbonTab2.Text = "Write";
    C1Ribbon1.Tabs.Add(RibbonTab2);