I have looked on Google but can not find answer or I can't word it correctly to find it.
When I develop a SWT application my computers desktop font size is set to windows 7 default size.
I mainly use Form layout with Grid layout for some windows.
My problem is that when the program is run on a windows system and the user has increased the font size of the desktop my layouts are all messed up.
If I go into windows settings and reset the font back to the default size everything looks fine again.
I have tried using setFont on all the widgets but it does not effect this problem.
What can I do about desktop font size being changed from the default?
Have attached an example image of the problem.
I've not used SWT and also without seeing the code this is all a bit of a guess but I suspect the problem is because you are specifying the exact dialog size rather than letting the dialog auto calculate the ideal size based on the components preferred sizes. In Swing you would do this using pack(), not sure what the equivalent is for SWT.
Joined: Jan 22, 2013
I tried what you suggested and here are the results.
I use a simpler screen than the configuration screen shown but still has the same problem.
The first image login1.png is how it should look.
The second image login2.png is after I removed the setSize call.
And the third image login3.png shows what happens after I add the pack() call.
I use Window Builder Pro and that GUI builder does not add pack() calls to the code generated.
If using pack() is part of the answer then I am doing something else wrong.