[Gtk-sharp-list] Newbie cuestion: delete_event of a window

Raśl Moratalla raul.moratalla@ono.com
Fri, 16 Jul 2004 19:35:33 +0200


Hi everybody:

I'm using the documentation of mono and there is the following example 
of a messagedialog:

MessageDialog md = new MessageDialog (parent_window, 
                                      DialogFlags.DestroyWithParent,
                                   MessageType.Question, 
                                      ButtonsType.YesNo, "Are you sure you want to quit?");
     
ResponseType result = (ResponseType)md.Run ();

if (result == ResponseType.Yes)
     Application.Quit();
else
     md.Destroy();

This code is launched in the signal delete_event of a window but, after 
this the window of the application is deleted. What should I do for 
avoid it?

Best regards,

Raśl