Some label controls change apparent font size when moved up/down

GJL

New Member
Joined
Mar 26, 2011
Messages
17
Some of my label controls change their apparent font size when moved to a different Top property on the form during runtime. Others do not.

All the label controls are set in design-time to have a font size of 9. For the problem label controls, even if I explicitly set them to 9 in run-time after moving them, they still display as what appears to be a font size of 10. Even if I change the font size to 8, and then to 9 -- or to 10, then to 9 -- in run-time after moving them, they still display as what appears to be font size 10.

When I check the problem label control's font.size property, it reports the font size it should have (9), not the larger font size that it displays as (10).

I don't see any difference in the label properties. I tried copying one of the label controls that did not have the problem, and changed its name and caption to replace one of the problem label controls, and deleted the original problem label control. But the problem was still there.

I tested in Excel 2010, 2007, 2003, 2002, and 2000, and all had the same problem. I tried 97 too but my project is not compatible with it, so I'm not sure if 97 has the same problem.

For the label controls that are affected by the problem, the problem occurs when I change the label control's Top property during runtime. If I don't change the control's Top property, the problem does not happen for that control.

Any idea why this problem is happening, and what I can do about it?


Thanks,

Greg
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top