Re: GtkTreeView possibilities to set text propertys on individual columns



Havoc Pennington <hp redhat com> writes:

> Mikael Hermansson <mikeh bahnhof se> writes: 
> > I have a question about the new tree widget in some way its a bit offtopic
> > on the gtk-devel-list
> 
> Well, it's OK since it's a kind of API issue. ;-) 
> 
> > 1. Is it possible to set text propertys like bgcolor/fgcolor/font on
> > individual rows 
> > the same way as the GtkCList/CTree?
> 
> You do this per-cell. Create a mapping between a color or font or
> whatever in the model, and a property on the cell renderer, using
> gtk_tree_view_column_set_attributes().
> 
> You can use the same column in the model for multiple columns in the
> view. Also, once Tim checks it in which will hopefully be any day now,
> I wrote a feature for libgobject which will automatically convert
> types in the model to the expected type of the property on the cell
> renderer if possible.

Additionally Havoc wrote a cool feature to get alternating colors for
free if all you want is that.

-Jonathan




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