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
3455
Adding RibbonTab runtime
posted
Hi,
Can you give me some help in adding a RibbonTab dynamically to a UltraToolManager and in this Ribbontab there can be groups and button tool. What I am planning is to first add UltraToolManager to a Form and set it's property Modifier to Public, then add the ribbontab , groups and buttons. Finally get this RibbonTab from the Form using Form Object and add this to the Main Form UltraToolManager. Please Confirm me whether this is possible, if yes can you give me some examples.
Regards,
Pgr2007
Parents
  • 44743
    Verified Answer
    posted

    It is possible. The following code will show the ribbon and add a tab with a group to it. Then it will add a button tool to the group.

    manager.Ribbon.Visible = true;
    RibbonTab tab = manager.Ribbon.Tabs.Add( "tab" );
    RibbonGroup group = tab.Groups.Add( "group" );

    ButtonTool rootTool = new ButtonTool( "button" );
    manager.Tools.Add( rootTool );

    ButtonTool instanceTool = (ButtonTool)group.Tools.AddTool("button");

Reply Children
No Data