Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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


Back to the top