1. Is it also possible to change the color of an entire row for the selection cursor? 2. Is it also possible to color only one cell in a row (for the selection cursor)?
--Hans Op 1/7/2007 schreef "Daniel Kasak" <[EMAIL PROTECTED]>: >On Sat, 2007-06-30 at 17:50 -0300, Diogo Ramos wrote: >> Sorry to bother you with, which seems to be a simple question, but I am> >> out of ideas.> > I am trying to coloring an entire row of a GtkTreeView.> >> After some search I discovered "GTK+ 2.0 Tree View Tutorial" from> >> Tim-Philipp Müller which taught me A LOT about tree views and the> paradigm >> of model-view.> Ok, said that, I am now able to paint an entire row, and >> just the row,> with a color of my choice but, the problem is that I am >> unable to do> that at execution time, just at the compilation time because >> the column> which has to be read for the renderer knows if the color should >> be> displayed or not isn't and I do not know why. >To colour things at run-time, based on data in your model, use >gtk_tree_view_column_set_cell_data_func() on each column you want >tocolour:http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func >This will get called for every cell, each time it's rendered, and it'sin here >that you set the renderer's background to your desired colour. >See >also:http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html#GtkTreeCellDataFunc > >--Daniel KasakIT DeveloperNUS Consulting GroupLevel 5, 77 Pacific HighwayNorth >Sydney, NSW, Australia 2060T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989email: >[EMAIL PROTECTED]: http://www.nusconsulting.com.au >_______________________________________________gtk-list mailing [EMAIL >PROTECTED]://mail.gnome.org/mailman/listinfo/gtk-list > > _______________________________________________ gtk-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-list
