Re: border "close" button



hi again :-)

how can I remove the decoration "close" button in the corner of a
gtk_dialog?


You cannot remove the button, since it's managed by the window manager,
but you can remove the effect of pressing the close button by connecting
the "delete_event" on the desired window to a functions that returns
TRUE and does nothing else.

E.g.

gint delete_event( GtkWidget *widget,
                   GdkEvent  *event,
                   gpointer   data )
{
    return TRUE;
}

[...]

g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK
(delete_event), NULL);

Cheers,
-- 
Olivier Fourdan <fourdan xfce org>
http://www.xfce.org




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