I would like to use Segoe UI 9 pt for Vista and Tahoma 8 pt for Windows XP, etc. (Actually, I agree with Segoe UI on both, but my users probably don’t install it.) But, it’s completely different, they really messed up the layout of my forms. So ... is there a good way to handle this?
Example: I have a Label , with some space in the middle in which I put the NumericUpDown control. If I use the Segoe user interface, NumericUpDown is about 5 pixels or so to the left of the space, compared to when I use Tahoma. It is a pain; I'm not sure what to do here.
So, in particular, my question is: how can I place controls in the middle of a space in Label (or CheckBox es, etc.)? In general: is there a good way to handle different fonts in Windows Forms?
Change I do not think that people understood this question. I know how to change OS based fonts. I just don’t know how to deal with layout problems that arise because of this.
Reply to ajryan, quick_dry : Well, you guys understand the question. I think MeasureString might work, although I would be interested to continue exploring the best ways to solve this problem.
The problem with splitting a control is most obvious, say, in CheckBox . There, if the user clicks on the “second half” of the CheckBox (which, I believe, will be a separate Label control), the CheckBox does not change state.
Domenic Sep 01 '08 at 0:32 2008-09-01 00:32
source share