Print Page | Close Window

Tabs font

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=15930
Printed Date: 02 October 2024 at 8:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tabs font
Posted By: feffe
Subject: Tabs font
Date Posted: 28 December 2009 at 12:04pm
 
Hi,
 
I'd like to change ribbon tabs font.
 
This code, put in CMainFrame::OnCreate, does not work.
 

LOGFONT lf;
CXTPRibbonTheme *pTheme = (CXTPRibbonTheme*)m_pRibbonBar->GetPaintManager();
theApp.m_font.GetLogFont(&lf);
pTheme->GetTabPaintManager()->SetFontIndirect(&lf);
 
I think it is due to the fact that I'm using a skin.
So, I set a timer and AFTER the window is opened, I set tabs font. 
 
But I think it's not a good solution. So, how can I change tabs font?



Replies:
Posted By: feffe
Date Posted: 28 December 2009 at 12:44pm

Another question....

If I try to adopt the solution above (using the timer) and I also try to set the font for docking panes:

m_paneManager.GetPaintManager()->UseOfficeFont(TRUE);

the commandbars text (eg, groups caption) becomes... vertical.

Why?



Posted By: znakeeye
Date Posted: 29 December 2009 at 4:35am

I'd derive CXTPRibbonBar and do that in the constructor. Otherwise you need to redraw the entire ribbon before the font change will have effect.



-------------
PokerMemento - http://www.pokermemento.com/


Posted By: feffe
Date Posted: 29 December 2009 at 4:51am

 

I use "OnRecalcLayout" and it seems to work...




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