Print Page | Close Window

Multiple ribbons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5326
Printed Date: 14 May 2024 at 3:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple ribbons
Posted By: znakeeye
Subject: Multiple ribbons
Date Posted: 19 October 2006 at 4:30pm
Hi!
 
I have an MDI application with several different views. Each view needs its own ribbon. When a view is selected its ribbon should be loaded. I have not been able to find a solution for this. I read a post here where the ribbon was loaded into the child frame, but that just looks weird if you ask me.
 
Hence, I want multiple ribbons where only one is visible at a time. Do I need to remove and re-add a ribbon in order to accomplish this?
 
Thanks in advance!
/Chris, Sweden



Replies:
Posted By: znakeeye
Date Posted: 19 October 2006 at 5:03pm
I managed to swap ribbons by adding them all in CMainFrame::OnCreate and then toggle their visibility in CXXXFrame::OnMDIActivate. This turned out to be a bad solution. You expect the swap to be instant, but it takes roughly one second.
 
There must be a better solution for this, or have I misunderstood the concept of ribbons? Maybe I should use that specialized tool-ribbon for my views?
 
Any ideas?


Posted By: znakeeye
Date Posted: 19 October 2006 at 5:18pm
How is it possible that you find the solution after you have posted a question at this forum?
 
I found the way:
ON_UPDATE_COMMAND_UI(XTP_ID_RIBBONCONTROLTAB, OnUpdateRibbonTab)
 
Then I simply show/hide the tabs. Only one ribbon. Smart =)
 
Thanks anyway!



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