clist row style



Hi,

I want to save the current style of the rows of a clist widget, before
to apply some color changes for the foreground, but the function
"gtk_clist_get_row_style(clist,row)" returns 0.

Moreover, then I can't change the foreground color (without loosing
current background color) :

GtkStyle *style;
GdkColor color_red = {0, 0xffff, 0x0000, 0x0000};

style = gtk_style_copy(gtk_clist_get_row_style(clist,row));
style->fg[GTK_STATE_NORMAL]      = color_red;
style->fg[GTK_STATE_ACTIVE]      = color_red;
style->fg[GTK_STATE_PRELIGHT]    = color_red;
style->fg[GTK_STATE_SELECTED]    = color_red;
style->fg[GTK_STATE_INSENSITIVE] = color_light_red;
gtk_clist_set_row_style(clist,row,style);


Any ideas to get the current style of a row (foreground and background
colors)?

Thanks for your help,
Jerome





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