Re: Changing the bg color of a list item



Is it anything to do with the fact that I am using a GtkList rather than a
GtkCList???

Thanks

Ian

----- Original Message -----
From: "Luis rosa" <luis viaxxi pt>
To: "Ian Frawley" <ifrawley opaltelecom co uk>
Cc: <gtk-app-devel-list gnome org>
Sent: Tuesday, October 30, 2001 5:24 PM
Subject: Re: Changing the bg color of a list item


On Tue, 30 Oct 2001 16:24:45 +0000
Ian Frawley <ifrawley opaltelecom co uk> wrote:

Hello
I didnt look to your code, but I have made the same
and my code is working but is a "dirty solution" (I dont want magic numbers
in my code)
I already post this before but here it is again

     GtkWidget * clist; //you have to initialize it or have a global pointer
to your clist

     GtkStyle *style=NULL;
     GdkColor style_color;
     int row= 0 ; //number of row to change

     //base = magenta
     style_color.red= 0;
     style_color.green = 60000;
     style_color.blue = 65535;
     style = gtk_style_copy (GTK_WIDGET (clist)->style);
     style->base[GTK_STATE_NORMAL] = style_color;

     gtk_clist_clear ((GtkCList *)sector_clist);


     gtk_clist_set_row_style((GtkCList *) clist, row, style);

Luis Rosa
luis viaxxi pt





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