RE: [gtk-list] Gtktree widget snapshot and question ...
- From: Stefan Jeske <jeske braunschweig netsurf de>
- To: gtk-list redhat com
- Cc: bolliet in2p3 fr
- Subject: RE: [gtk-list] Gtktree widget snapshot and question ...
- Date: Sat, 29 Nov 1997 19:48:59 +0100 (MET)
On 29-Nov-97 BOLLIET Jerome wrote:
> That work but the color of event box is grey and tree background is
> white.
> And i don't known how change this color !
> I've try change style of event box but this solution don't work.
>
> Can you tell me how change this color ?
Try the following code from Owen Taylor :
--------
void
event_box_state_changed (GtkWidget *w)
{
if (w->state == GTK_STATE_NORMAL)
gdk_window_set_background (w->window, &w->style->white);
else
gdk_window_set_background (w->window, &w->style->bg[w->state]);
if (GTK_WIDGET_DRAWABLE(w))
gdk_window_clear_area (w->window, 0, 0,
w->allocation.width, w->allocation.height);
}
event_box = gtk_event_box_new ();
gtk_signal_connect(GTK_OBJECT(event_box), "state_changed",
GTK_SIGNAL_FUNC (event_box_state_changed), NULL);
gtk_signal_connect(GTK_OBJECT(event_box), "realize",
GTK_SIGNAL_FUNC (event_box_state_changed), NULL);
... show the listbox, fill in contents ...
----------
That worked for me ! ;)
Ciao,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]