Print Page | Close Window

Moving ribbon tabs, groups and controls

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15783
Printed Date: 18 July 2025 at 1:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Moving ribbon tabs, groups and controls
Posted By: rdhd
Subject: Moving ribbon tabs, groups and controls
Date 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?



Replies:
Posted By: rdhd
Date 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.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net