Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
545
How to align a labeltool on a ribbon to center or to the left
posted

I have a ribbonbar with buttons on it.  I want to know how to add a labletool so that it shows either on the left or the center. This ribbon has only one tab in it and I have removed the tab header.

 

I am using this code and it adds the lable to the right no matter what I try

Dim lblTool As New LabelTool(LabelKey)
 Dim isExisting As Boolean = False
                
 lblTool.InstanceProps.Spring = Infragistics.Win.DefaultableBoolean.True

lblTool.SharedProps.AppearancesSmall.Appearance.TextHAlign = Infragistics.Win.HAlign.Left

lblTool.SharedProps.Caption = "Company Name"
lblTool.SharedProps.DisplayStyle = ToolDisplayStyle.TextOnlyAlways
             
Me.Ribbon.ToolbarsManager.Tools.Add(lblTool)
Me.Ribbon.TabItemToolbar.Tools.AddTool(LabelKey)

  • 44743
    posted

    It is not possible to use the RibbonTabItemToolbar to show tools on the left or center of the ribbon tab area.