[Gtk-sharp-list] How do I keep main window from closing?

Jiří Zárevúcky zarevucky.jiri at gmail.com
Mon Jul 20 23:14:24 EDT 2009

2009/7/21 bdubu <bwb at fireflysoftware.com>:
> I have a TextView on my main window.  I don't want to be able to close the
> main window if the text in this TextView has been modified but not yet saved
> to disk.  I realize I can check the control's Buffer.Modified property and
> that this should likely be done in the main windows's OnDeleteEvent handler
> but I don't know how to make this work.  I took a WAG and tried this...

Your problem is that RetVal set to true prevents closing, not the
other way around. When you leave the default false, it will close as

More information about the Gtk-sharp-list mailing list