ComponentOne Ribbon for WinForms
C1Ribbon (Classic) Task-Based Help / Aligning Multiple Labels
In This Topic
    Aligning Multiple Labels
    In This Topic

    C1Ribbon allows you to align multiple labels within your RibbonGroup using the MaxTextWidth and MinTextWidth properties. For this help, we will create two RibbonToolBars containing the default RibbonButton, a RibbonComboBox, and a RibbonLabel.

    1. Add two RibbonToolBars to your application. By default, the RibbonToolBar contains a RibbonButton.
    2. Float over the upper left corner of the first Toolbar until the glyph appears. Click the action button and select Add ComboBox from the list.
    3. Click the glyph again and click the action button again. Select Add Label from the list.
    4. Repeat steps 1- 3 with the second Toolbar.
    5. The Ribbon application should appear as in the following image:
    6. Select the RibbonLabel on the first Toolbar and choose Text Settings from the RibbonLabel Toolbar. In the Text textbox, enter This is a very long text string.
    7. In the RibbonLabel Properties window, scroll down to the MaxTextWidth property and set it to 130. Enter the same number for the MinTextWidth property.
    8. Select the RibbonLabel on the second Toolbar and choose Text Settings from the RibbonLabel Toolbar. In the Text textbox, enter This is another very long text string.
    9. In the RibbonLabel Properties window, scroll down to the MaxTextWidth property and set it to 130. Enter the same number for the MinTextWidth property.
    10. Press F5 to run your application. Your application should resemble the following image: