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
1825
winRibbon tabs and groups?
posted

Morning,

I need to know if tis possible to make a copy of a group on one tab and then assign that copy to another tab?

So I have a tab with a group designed on the form.

At run time new tabs are created. For each of these tabs I want to add a copy of that group.

Dim objRoomToolsGrp As New RibbonGroup("Tools")

objRoomToolsGrp = uwTBMgr.Ribbon.Tabs(0).Groups(2)

 

then I would assign that copy like so:

uwTBMgr.Ribbon.Tabs(objDir.Name).Groups.Add(objToolsGrp)

But I am getting an error telling me its already assigned to another  parent tab.

how do I make a copy of the group that isn't assigned to a tab? And then assign it to the tab I want it on?

hope that makes sense.

Thanks

Deasun

 

 

Parents
No Data
Reply
  • 1825
    posted

    got a bit further, playing around.

    Dim objToolsGrp As New RibbonGroup("Tools")

    objToolsGrp = objRoomToolsGrp

    objToolsGrp.Key = "Tools-" & objDir.Name

    objToolsGrp.ParentCollection.Clear()

    uwTBMgr.Ribbon.Tabs(objDir.Name).Groups.Add(objToolsGrp)

    when I use, objToolsGrp.ParentCollection.Clear(), I do get a copy of the group, with all its tools, but its only on the last tab created.

    All the tabs in front of it don't have the group.

    puzzled!

     

     

Children