Print Page | Close Window

How to change docking pane font size?

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=22331
Printed Date: 05 October 2024 at 5:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change docking pane font size?
Posted By: nclee
Subject: How to change docking pane font size?
Date Posted: 19 June 2014 at 12:46am
Hi,

I'm using v16.2.4.

pane font size

I'm Using Office2013 theme, but pane font size is too large.

How to change font size??

Please...







Replies:
Posted By: rdhd
Date Posted: 14 January 2015 at 12:41pm
We have the same issue and I'm working on it now. I have found the m_nFontSize member of the XTPDockingPaneThemeOffice2013 object. We subclass from the class but setting the value in the ctor is useless as CJ overwrites it later when RefreshMetrics is called.

The RefreshMetrics method is virtual and in that method the font height is calculated by XTPCalcLogFontHeight, which is not a method that can be overridden. It is passed the theme's m_nFontSize member. That member is not set in the constructor and the only place I found it being set is in RefreshMetrics via a call to CXTPResourceImages::GetImageInt.

Of course there is no "SetImageInt". The value returned is 16 and XTPCalcLogFontHeight scales it to 21 (on my 96 dpi system). I have not found a way to "override" that setting.

I can stop in debug and set lfHeight back to what we get when running with a 2007/2010 paint theme and that gives us a better result.

At this point there appears to be only two ways to work this out. Implement RefreshMetrics and copy the CJ code, including XTPCalcLogFontHeight and don't call "pImages->GetImageInt(...,_T"FontSize") and just set the size to 12 (same as 2007/2010). This assumes I can get to all the other APIs that calls.

Alternatively a strategically placed call to SetCaptionFontIndirect might also solve the problem.




Posted By: rdhd
Date Posted: 14 January 2015 at 12:57pm
Don't waste time calling SetCaptionFontIndirect. The numerous calls to RefreshMetrics still call SetCaptionFontIndirect and even though I have set my own font, CJ completely ignores that fact.

I'm not even sure why SetCaptionFontIndirect exists for this theme.


Posted By: mcmastl
Date Posted: 15 April 2015 at 1:26pm
We have informed our development team of the issue and will be looking into it.  Thank you for bringing this to our attention.  If the issue has been resolved please let us know.  Thank you.

-------------
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: markr
Date Posted: 08 July 2015 at 1:43pm
Just a quick note - SetCaptionFontIndirect seems to work as expected for me in XTP v17 beta 1.



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