[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-swt-dev] Prevent Shell from closing/disposing
|
Hi Ulrik,
When handling the respective shellClosed event just set the doIt flag of the
ShellEvent which was handed over to false. This will prevent the close
operation from being executed. In other words the close operation is
cancelled.
Best regards
Sebastian Machhausen
-----Original Message-----
From: platform-swt-dev-bounces@xxxxxxxxxxx
[mailto:platform-swt-dev-bounces@xxxxxxxxxxx] On Behalf Of Ulrik Witschass
Sent: Thursday, August 03, 2006 1:35 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: [platform-swt-dev] Prevent Shell from closing/disposing
Hello List,
I currently face a problem which I couldn't solve by googling.
I want to open a Dialog when the toplevel Shell is closed via the
close-button in the titlebar. The dialog should ask the user wether he
really wants to quit (due to unsaved data).
The problem I have: I don't know how to "stop" the closing of the Shell.
I both tried the Dialog in the disposeListener and the shellListener in
shellClosed, but in both cases, I don't know what to do if the user
klicks "Cancel", I don't know how to stop the shell from closing/disposing.
Any help is greatly appreciated!
best regards and please excuse my bad english as it is not my native
language
Ulrik
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev