Below snippet of code can be used in a SWT dialog box to disable the close button on window.
//disabling the close button
dialogShell.addShellListener(new ShellAdapter() {
public void shellClosed(ShellEvent e) {
e.doit = false;
}
});
Wednesday, September 9, 2009
Subscribe to:
Post Comments (Atom)
Viele Danke :)
ReplyDeleteHi Abeish Babu..
ReplyDeleteThis is sudheer.
I used your code to disable the window close button.It is working fine at the level only.
And one more thing when i want to close the window in programatic maner it means when we write a button and that to be perform the event(close the window).It won't work.
thank for your code...