[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: How to size the width of a wizard when message is very long

I don't think you can call it inside of your createControl because I don't believe that the page has been laid out yet and thus no components will have their sizes set. When I was testing it, I put it in my wizard page's validation code (inside the page itself) which gets called when my first component gains focus. I imagine you could add a focus listener to the component that you pass to the setControl(component) function inside of createControl() and then simply add your code there. You might want to do a few checks though to make sure that you don't keep recalculating the size if nothing has changed.

Topher Fangio

Jason D wrote:
Thanks Topher!

Where should I call the getWizard().getContainer().getShell().setSize(someWidth, someHeight)? In the wizard page or in the code that I create the WizardDialog? If in the wizard page, do I call it at the end of the createControl?

Below is the code that I create the wizard dialog.

WizardDialog dlg = new WizardDialog(shell, wizard);
dlg.create();
dlg.open();

Thanks,

Jason