Re: [gtkmm] Gtk::Window::on_delete_event



i take it you have a main window that derives from Gtk::Window ?
In that case a construction like this will suffice.

------------------------------------------------------------------
class mainwindow : public Gtk::Window
{

bool on_delete_event(GdkEventAny* event)
{
this->hide();
return true;
}

};
----------------------------------------------------------------------

regards,

Bart

On Sat, 2004-04-10 at 13:21, Andreas B. Thun wrote:
> Hi Bart,
> 
> I am not sure about how to use GdkEventAny.
> I want to invoke cGui.hide() if the x is selected:
> 
>    Gtk::Window cGui();
>    Gdk::Event hideEvent = Gdk::Event(); //? want a hide()
>    cGui.on_delete_event(hideEvent);     //?
>    Gtk::Main::run(cGui);
> 
> > just overriding Gtk::Window::on_delete_event(GdkEventAny* event) works
> > fine for me.
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list




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