Re: Coloring an entire row at a GtkTreeView
- From: "Hans Oesterholt-Dijkema" <hdnews gawab com>
- To: "Daniel Kasak" <dkasak nusconsulting com au>, "Diogo Ramos" <diogofsr gmail com>
- Cc: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Coloring an entire row at a GtkTreeView
- Date: Mon, 02 Jul 2007 09:01:31 +0000
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" <dkasak nusconsulting com au>:
>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: dkasak nusconsulting com auwebsite: http://www.nusconsulting.com.au
>_______________________________________________gtk-list mailing listgtk-list gnome orghttp://mail.gnome.org/mailman/listinfo/gtk-list
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]