Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Moving ribbon tabs, groups and controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Moving ribbon tabs, groups and controls

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 933
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Moving ribbon tabs, groups and controls
    Posted: 05 December 2009 at 12:44pm
I am working on customization of our ribbon.
 
How do I move a ribbon tab?
 
How do I move a group?
 
How do I move a control?
 
I have not found any methods that support this. Calling the Remove methods so I can then call an insert method causes deletion of the control.
 
Should I just call the "get at" method, addref the item and then call remove and insert or is there direct support for this that I have missed?
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 933
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 05 December 2009 at 5:31pm
I found I can easily move a tab by getting the tab manager from the tab and calling the MoveItem method of the tab manager.
 
Moving a group was not so easy (or cheap). I had to get the groups object. Insert a new object at the desired location. Then call the Copy method on the new group I just inserted passing in the group I originally wanted to move. Then I deleted the original group.
 
I could not find a way to just move the original group. I tried addreffing the original group and calling Remove but the group deleted all the controls and I ended up with an empy group when I reinserted it where I wanted it. So I have to suffer having all the controls cloned and the original controls deleted (along with the original group).
 
It sure would have been great if there was a bit of symmetry and the groups object, like the tab manager, had a MoveItem method.
 
I have not yet got to moving a control. I sure hope there is an easy (and cheap) way to move a control.
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.