Solved

How to make Scale method scale fonts in contained controls

Posted on 2008-06-19
1
359 Views
Last Modified: 2013-11-26
Hello, Experts,

I have a custom control (i.e. inherited from Control) that contains a Label.  When I apply the Scale method to this custom control, all of the contained controls also scale as expected.  However, the Label's Font does not scale.  I have an old vb.net (also v1.1) application that contains a similar custom control.  This control contains another custom control that contains a Label.  In this case the Label's Font size does change when the Scale method is applied to the outermost control.  

This makes me think that it must be possible to make the Font scale with the size of the control, but though I have studied it in detail, I cannot find the difference between my new custom control and the custom control in this older application that causes its contained fonts to scale.

Is there something obvious that I am overlooking?

Thanks for any suggestions.

Cheers,
Randy
0
Comment
Question by:omegaomega
1 Comment
 
LVL 12

Accepted Solution

by:
omegaomega earned 0 total points
ID: 21825056
I found the answer shortly after posting.  

There was an override of ScaleCore in one of the ancestors of the older application's cusotom control that was adjusting the Fonts.  Easy, I guess.  (Don't know how I managed to miss it on my earlier searches.)  (There are only three ancestors between it and Control...)

Sorry for any inconvenience.

Cheers,
Randy
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now