Re: Gtk::Dialog::on_delete_event() is never called



Tobias Eberle wrote:

Hallo,

I want to prevent that the user can close a dialog (derived from
Gtk::Dialog) by clicking on the X. I tried to override
on_delete_event():

class CMyDialog : public Gtk::Dialog
{
 //...
 protected:
   bool on_delete_event(GdkEventAny *);
}

but on_delete_event() is never called. Is this a bug or is there another
mechanism to catch the delete event?

Thanks.

Tobias

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Before displaying the dialog, call its "set_decorated" method with FALSE as its parameter. This will remove the close icon (X) from the window (along with its title bar, minimize and maximize icons).

Bob



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]