Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Adding and deleting node on Ribbon bar Collapse All
Subject Author Date
Alexander Pavluk May 7, 2007 - 2:39 AM

In my application I need dynamically add and delete buttons to the Ribbon bar. When I add and delete buttons to non-active page all works fine. But when I add button to active page it dosn’t appear until I switch to the other page and return back. When I try to delete the button from the active page using RemoveCommand method application crashes.

Vlad K Jun 6, 2007 - 11:21 AM


i have the same question...

i tried adding extra nodes (to the existing one) like it was shown in the RibbonBar example:
1) add some extra CExtRibbonNodes
2) pass mp_node_root to SetButtons() // i cached the root node
3) call recalc layout;
4) it did not work - the app crashed.

Could you please send an example of code?

PSˆ if real new/delete is not possible .. could it be possible just to show/hide CExtRibbonNodeGroup(s)?

Technical Support Jun 6, 2007 - 12:18 PM

This approach works and have already been used by our customers. We need to take a look at the call stack demonstrating the crash point. You can also send us your project so we can find out what’s wrong.

Technical Support May 7, 2007 - 11:56 AM

You can add and remove buttons, groups or pages in the ribbon bar by re-constructing the command tree and assigning it to the ribbon bar again. Did you try this way?