Resize a wizard dialog
A quick hint, if anyone is looking for a solution.
Obviously, if you create the wizard dialog by hand, you can use WizardDialog#setPageSize( … ).
However, it is a little bit harder to find when you want to force the size of a page in a wizard created by the platform.
Typically, one of the new wizards (File > New > …).
I got this problem with a TableViewer, on which I had set a TableLayout and forced the width of my columns.
It appeared that the wizard page was not large enough and let a scroll bar in my table.
The best solution was to force the width of my wizard (which had only one page).
The solution is in fact quite simple.
Just set the size of the shell in the createControl( Composite ) method.
At the end of this method, I put
// Force the shell size Point size = getShell().computeSize( 510, 540 ); getShell().setSize( size );
About this entry
You’re currently reading “Resize a wizard dialog,” an entry on Vincent Zurczak's Blog
- March 19, 2010 / 8:01 pm