Large Fonts and button missing

  • Thread starter Thread starter Lance Johnson
  • Start date Start date
L

Lance Johnson

We have a form with a button anchored to the bottom and right. When regular
fonts are used it works fine. However when this is changed such that Large
Fonts are used in Display settings, some of our forms have buttons missing.
Has anybody seen this before or what should I do so that the buttons appear
on these Large Font systems?

Thanks,
Lance Johnson
 
Hi Lance ,

Does this behavior occur on other Winform applications? I tried what you
said, but could not reproduce the problem. If possible, run this
application on other machines to see if this behavior would occur.

Also, check the buttons' Location property at runtime. Does it show a
reasonable value?

Regards,

Felix Wu
========
This posting is provided ¡°as is¡± with no warranties and confers no rights.




--------------------
 
OK. I've been able to come up with an example to replicate this behavior I
believe. Not all my apps have tab pages but this one so happens to. I've
created a form that's size 324,361 in design mode of VS.Net. I put a tab
control that is of size 309, 318 with 1 tab page. The location of the tab
control is 0,6. I put a button in the tab page for this tab at location
219, 264. When viewed regularly it looks fine. When in Large fonts the
button is missing.

Lance Johnson
 
Hi Lance,

I reproduced the behavior with your instructions. I think the problem is
caused by the system's DPI settings. The controls' size are messed up in
high PDI mode, but you could workaround this by setting the button's Anchor
property "Bottom, Right" side of its container.

Regards,

Felix Wu
=======
This posting is provided °as is" with no warranties and confers no rights.


--------------------
From: "Lance Johnson" <[email protected]>
References: <[email protected]>
<[email protected]>
 
Hi Lance,

I apologize for my delayed response. I was performing research these days,
but could not find any solid solutions. The problem is caused by the fact
that the controls' size is not correctly scaled when DPI is changed. The
only workaround I figure out so far is to set the Form's "AutoScale"
property to False. You could also try it to see if it helps in your
scenario.

Regards,

Felix Wu
=======
This posting is provided °as is" with no warranties and confers no rights.


--------------------
From: "Lance Johnson" <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
 
This doesn't do the job. It worked for the small sample I sent you. But
I've had other examples where it fails. And if it didn't necessarily fail,
it failed because the text got messed up because the control didn't expand
to fit the new size. For example a checkbox I have now has the text on 2
lines. I believe this is considered a bug of some sort. I would like for
the right people to at least know about this problem.

Lance Johnson
 
Hi Lance,

I have filed a bug for this problem. It is possible that this may be fixed
in the next release of the product, but I cannot guarantee a resolution of
this issue at this time.

Thank you for your feedback.

Regards,

Felix Wu
=======
This posting is provided °as is" with no warranties and confers no rights.


--------------------
From: "Lance Johnson" <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
<pE#[email protected]>
 
hi,

i've a simular problem. I use the following hack in my Forms

new public static SizeF GetAutoScaleSize(Font font)
{
return new SizeF(1f, 1f);
}

ciao
Torsten
 
Back
Top