Print Page | Close Window

Ribbon bar selection problem.

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=23242
Printed Date: 23 December 2024 at 1:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon bar selection problem.
Posted By: jasondmichaelson
Subject: Ribbon bar selection problem.
Date Posted: 11 January 2017 at 5:05pm
I've got a problem I'm trying to solve with a ribbon bar that contains a few tabs along with a System Button representing the File Menu which contains a backstage view. We've customized the colors in our theme, so that unselected tabs appear with a blue background. The problem I'm experiencing is that since the selected versus unselected tabs have different background colors, when I open up the backstage view under the file menu, CXTPRibbonTabColorSet::SetTextColor() appears to be treating the selected tab as unselected from this code:

if (bSelected && pRibbonBar->IsBackstageViewVisible())
bSelected = FALSE;

and my previously selected ribbon bar tab is being treated as unselected, and I'm getting white text on a white background for that tab.

Is there a better way to add the backstage view to the ribbon bar than with this:

CXTPControlPopup* pControlFile = (CXTPControlPopup*)m_pRibbonBar->AddSystemButton(ID_RBN_FILE);

CXTPRibbonBackstageView* pView = CXTPRibbonBackstageView::CreateBackstageView(GetCommandBars());
CXTPRibbonControlSystemButton* pButton = m_pRibbonBar->GetSystemButton();

if( !m_filePageInfo.GetSafeHwnd() ) {
m_filePageInfo.Create(CFilePageInfo::IDD, this);
}

if( !m_filePageOpen.GetSafeHwnd() ) {
m_filePageOpen.Create(CFilePageOpen::IDD, this);
}

if( !m_filePageOptions.GetSafeHwnd() ) {
m_filePageOptions.Create(CFilePageOptions::IDD, this);
}

if( !m_filePageActions.GetSafeHwnd() ) {
m_filePageActions.Create(CFilePageActions::IDD, this);
}

if( !m_filePagePrint.GetSafeHwnd() ) {
m_filePagePrint.Create(CFilePagePrint::IDD, this);
}

if( !m_filePageSave.GetSafeHwnd() ) {
m_filePageSave.Create(CFilePageSave::IDD, this);
}

CXTPRibbonBackstageTab* pTabDefault = AddBackstageTab(*pView, m_filePageInfo, ID_MENU_INFO, dTabFlags);
AddBackstageTab(*pView, m_filePageOpen, ID_MENU_OPEN, dTabFlags);
AddBackstageTab(*pView, m_filePageSave, ID_MENU_SAVE, dTabFlags);
AddBackstageTab(*pView, m_filePagePrint, ID_MENU_PRINT, dTabFlags);
AddBackstageTab(*pView, m_filePageOptions, ID_MENU_OPTIONS, dTabFlags);
AddBackstageTab(*pView, m_filePageActions, ID_MENU_ACTIONS, dTabFlags);


or is there similar code missing in the render path for the tab button background to treat that as unselected if the backstage view is visible?



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