Re: Colors in a tree view



Hi!

I want to change the color of the text in single entries of a tree
view. Does anybody know how to do this?

Thanks,

  /Arne

i'm not sure what you mean by 'entry', but i know of two ways to
colour individual cells in a treeview:

1. use the markup property to render text
(gtk_tree_view_column_add_attribute(col, renderer, "markup", colnumber))
and print text with pango markup ("<span background='white'
foreground='red'>your text</span>") into the cells.

2. use a custom cell renderer that sets the "foreground" property of
the renderer in the cell data function: g_object_set(renderer,
"foreground", "red", NULL).

gyözö

-- 
Ed Sullivan will be around as long as someone else has talent.
                -- Fred Allen



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