Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] dialog or Modal Window in SWT

Hi there,

I am trying to make a Modal Window in SWT that display a selected image from
a thumbnail.

I have tried

Shell dialog = new Shell(parentShell, SWT.DIALOG_TRIM);
....
populate dialog
blah blah blah
.....
dialog.pack();
dialog.open();
while(!dialog.isDisposed())
{

            if (!thisFrame.getDisplay().readAndDispatch())
            thisFrame.getDisplay().sleep();
}


now after this is where I am stuck.
I can get teh dialog to display, and also to act in a modal fashion i.e. if
I try to select the parent window, the dialog title bar flashes, and I am
not able to go back to the parent window.

If I close the dialog window, something strange happens to the display. It
either disappears completely, or isn't all there, if I try to redraw the
screen, it works but I still and it is the active window, but I can't do
anything with it, the application seems to freeze

what am I doing wrong

Any help would be great

regards

Steve



Back to the top