Bring up a window on application startup after main window is shown [message #324572] |
Sun, 27 January 2008 13:03  |
Eclipse User |
|
|
|
Hi Folks,
I'm wondering how I can bring up a modal window (for example, a welcome message) after my main ApplicationWindow is shown? I'm using JFace but am also interested how you'd do it in SWT.
I managed to get something working by overriding the open() method on my ApplicationWindow and doing something like this...
@Override
public int open() {
int result = super.open();
MessageDialog.openInformation(getShell(), "Welcome", "Hello");
return result;
}
but the main window appears above this welcome dialong. I'm wondering if it'd be better to use some child window but I havn't read that chapter yet!
Cheers for any tips,
Toby
|
|
|
Re: Bring up a window on application startup after main window is shown [message #324584 is a reply to message #324572] |
Mon, 28 January 2008 03:38   |
Eclipse User |
|
|
|
Hi,
in my RCP-App it works like this:
in ApplicationWorkbenchWindowAdvisor:
@Override
public void postWindowOpen() {
MessageDialog.openInformation(
getWindowConfigurer().getWindow().getShell(), "Info", "hello");
}
hth,
Manuel
Toby Weston wrote:
> Hi Folks,
>
> I'm wondering how I can bring up a modal window (for example, a
> welcome message) after my main ApplicationWindow is shown? I'm using
> JFace but am also interested how you'd do it in SWT.
>
> I managed to get something working by overriding the open() method on
> my ApplicationWindow and doing something like this...
> @Override
> public int open() {
> int result = super.open();
> MessageDialog.openInformation(getShell(), "Welcome", "Hello");
> return result;
> }
>
> but the main window appears above this welcome dialong. I'm wondering
> if it'd be better to use some child window but I havn't read that
> chapter yet!
>
> Cheers for any tips,
> Toby
--
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02833 seconds