Re: [gtkmm] color rows in treeview



Ondrej Tuma wrote:


------------------------------------------------------------------------


Hi,
I have small problem. I need Gtk::TreeView with rows (some special rows)
with another color then gtk style, for example red (font or background).
In CellRendererText documentation you may find list of attributes that could be used for your needs. Of course, your row should contain only text columns then.
One of solutions may be following:
- create hidden column in your model to hold row color
- when adding columns to TreeView, link column renderer color attribute with hidden column ( TreeView::Column::add_attribute() ), so, changing value for hidden column in model would change row color or whatever you need (depending on attribute you've linked)






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