Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Centering a wizard dialog
Centering a wizard dialog [message #64356] Thu, 05 June 2003 15:44 Go to next message
Eclipse UserFriend
Hi,
How do you center a wizard dialog relative to the Eclipse workbench ?? I
used the getShell().setSize() method to resize the wizard and when I use the
dialog.open() method, it splashes the dialog at different locations
everytime I open it. I tried resetting the parent shell to PlatformUI's
active workbench window shell but it doesn't seem to work.

Any thoughts ??

Regards,
Sudarshan N Raghavan
Re: Centering a wizard dialog [message #64631 is a reply to message #64356] Thu, 05 June 2003 17:05 Go to previous message
Eclipse UserFriend
Sudarshan Raghavan wrote:
> Hi,
> How do you center a wizard dialog relative to the Eclipse workbench ?? I
> used the getShell().setSize() method to resize the wizard and when I use the
> dialog.open() method, it splashes the dialog at different locations
> everytime I open it. I tried resetting the parent shell to PlatformUI's
> active workbench window shell but it doesn't seem to work.

Override configureShell(...) and call shell.setBounds(...). You should
be able to calculate the bounds by calling getParentShell() and using
its bounds. I'm not sure if this is the best way to do it, but it works
for me.

Jeff
Previous Topic:only rebuild, no compile item in the menu
Next Topic:View arrangement question
Goto Forum:
  


Current Time: Thu Mar 13 14:05:52 EDT 2025

Powered by FUDForum. Page generated in 0.02732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top