[Gtk-sharp-list] Deletevent return value?
Anset
anset@anset.org
Fri, 1 Oct 2004 17:34:36 +0200
Hi,
I want my app to display the well known "are you sure" and keep the window
from closing when the user says NO.
I need to do this in the DeleteEventhandler right? In gtk you can return
true or false if you want to close the window or not.
Now, in gtk-sharp, this is the DeleteEventHandler delegate:
public sealed delegate void DeleteEventHandler (object o, DeleteEventArgs
args)
As you can see, the return type is void, so no true or false...
So how do I do this?
To add to the confusion, the widget.DeleteEvent event has the following text
next to it in monodoc:
If the handler returns False, the widget will be destroyed (and the window
closed), but if the handler returns True, nothing will be done. This is a
good way to prevent the user from closing your application's window if there
should be some cleanups first (like saving the document).
Well, any info is appreciated!
Wkr,
Anset