|
Re: Preventing a shell from closing [message #480112 is a reply to message #480109] |
Thu, 13 August 2009 21:28 |
Eclipse User |
|
|
|
Originally posted by: phillipus.nowhere.net
Marian Schedenig wrote:
> Hi!
>
> I'm trying to make a window which cannot be closed using the close button in
> the title bar. According to what I can find on the web, the following should
> work:
>
> getShell().addShellListener(new ShellAdapter()
> {
> @Override
> public void shellClosed(ShellEvent e)
> {
> e.doit = false;
> }
> });
>
> However, at least in GTK, the method is called only *after* the shell has
> already been disposed (verified through e.widget.isDisposed()). I haven't
> yet had a chance to try in Windows.
>
> Also, GTK always displays a close button, regardless of whether the shell's
> style includes one or not. This may be correct behaviour, however I really
> need a working way to prevent the shell from closing when it is clicked.
>
> Thanks,
> Marian.
>
I tested on Windows 7. It works as expected. Could be Linux bug. Make a
test snippet and post it here.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03142 seconds