Re: hiding a widget instead of destroying it



Am Mit, 2001-12-19 um 22.22 schrieb Rok Roskar:
Hello....

I am trying to hide a window instead of destroying it when the use clicks
the window manager's 'close' button... I tried making a delete_event
handler for the widget, but it still kills the widget instead of just
hiding it.... can this be remedied? Can you have a dialog pop-up window
without the window-manager frame around it? ANy help would be greatly
appreciated.... Thanks,


Try something like this:

static gboolean my_window_delete_event_handler(GtkWidet *window,
GdkEvent* event, gpointer data)
{
        gtk_widet_hide(window); /* hides the window */
        
        return FALSE;           /* prevents the destruction of the window */
}

This should work, however you might experience problems when you want
gtk_widget_show() your widget again. The gnomeicu-source is a good place
for more info on this.

Greetings,
Jörgen 

-- 
There are two major products that come from Berkeley : LSD and UNIX. We
don't believe this to be a coincidence.

Jeremy S. Anderson




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