Evan Van Dyke wrote:

> Evan Van Dyke wrote:
> 
>> I am working on an application where I wish the background color
>> for a GtkListItem to be different from the background color of the
>> GtkList.  I have tried setting the bg/base fields of the GtkListItem
>> but this doesn't appear to help.  Needless to say most of the widgets
>> I am packing into the gtkListItem are Labels(which don't draw their
>> own background).  Is there any way to give each ListItem its own
>> background color?  Thanks.
> 
> 
> 
> As a further clarification on this, I am filling the list with widgets
> 
> not text, which is why it wasn't originally implemented as a CList.
> It is my impression that it is not possible to stick arbitrary widgets
> into the cells of a CList.  Therefore, it is(currently) a List.


Hi Evan, an easy way to do this is to put each GtkLabel widget into a 
GtkEventBox. This makes each one have a separate window, so you can set 
the background colour for each one in the way you'd set any background 
colour (you could specify the colours in a .gtkrc file, for example).

On the downside, this will be rather slow for large lists, but maybe 
that's not a problem.

John

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to