How to open dialog windows in center of view? [message #488324] |
Mon, 28 September 2009 02:45  |
Eclipse User |
|
|
|
Hello,
I am trying to setup my application to open a pop-up/dialog window in
the center of the view from which it was requested. When I go to get a
shell to give to the pop-up's constructor, I can only get access to the
shell for the entire window, so my pop-ups open centered to the
workbench window.
I can create a new shell and set it so that has the same size and
location as the view by getting the bounds from the parent shell passed
into the view, by that of course only works if the view stays in that
position for the entire time the application is up. If the user moves
the view, the pop-up will center in the original location.
How do I get a shell that represents the current location of a view at
any given time, or is there an easier way?
Thanks,
Jason
|
|
|
Re: How to open dialog windows in center of view? [message #489233 is a reply to message #488324] |
Thu, 01 October 2009 19:25  |
Eclipse User |
|
|
|
So no ideas?
My application is going to take up either 2 or 4 monitors, so this is more of an issue than for a single monitor setup where there are only so many places a dialog window can open.
Is there just no way to get the view's current position in the workbench? Something has to know in order to recreate the workbench upon restart.
|
|
|
Powered by
FUDForum. Page generated in 0.50039 seconds