views:

192

answers:

1

I have a user control contained in a tabpage. The Form has set AutoScaleMode = AutoScaleMode.Font and the UserControl has set AutoScaleMode.Inherit.

Now when I enlarge the font size of the form then the font is enlarged in the user control too, but the controls contents are not scaled. If I explicitly set AutoScaleMode.Font on the user control then it works properly.

Shouldn't AutoScaleMode.Inherit work that way?

A: 

MSDN has an explicit warning given:

In the .NET Framework versions 1.0 and 1.1, automatic scaling was supported using a simpler mechanism that always relied on the current system font. This mechanism is now obsolete but still supported for backward compatibility. You can obtain the older scaling behavior by setting the AutoScale property of the containing Form to true, which will also implicitly set the ContainerControl.AutoScaleMode property to None. Conversely, setting the ContainerControl.AutoScaleMode property of a form will set AutoScale to false, enabling the newer scaling mechanism introduced with the .NET Framework version 2.0.

so: first question: which framework-version are you using ?

second guess: is your control added after the initializing of the form ?

ralf.w.
Iam using framework 2.0.No, it is all done at design time.
codymanix