Kevin wrote:
> Greetings,
>
> I came across an old message in the archives at 
> http://www.mail-archive.com/[email protected]/msg15480.html , which sounds a 
> lot like I want to do (though I want to work with background colors rather 
> than foreground colors).  But I was thinking: couldn't I just add a column to 
> my model containing the color values I want for each row, and use values of 
> #ffffff for all the rows I wanted to leave white?
>
> The problem is that without a column of booleans, I can't seem to set the 
> background-set property of the columns.  Specifically, I'm using:
>
> leftjust = gtk.CellRendererText()
> column = gtk.TreeViewColumn('Filename', leftjust, text=COLUMN_FILENAME)
> column.set_sort_column_id(COLUMN_FILENAME)
> treeview.append_column(column)
>
> column.add_attribute(leftjust, 'background-set', True)
>   
remove the above line.
> column.add_attribute(leftjust, 'background', COLUMN_FLAG)
>
> but when I run the program, I keep getting 
> Warning: unable to set property `background-set' of type `gboolean' from 
> value of type `gchararray'
>
> Is there really no way of doing this without creating another column of 
> booleans?
>
>   
You don't have to set "background-set" - it's set automatically when 
"background" is set.

John
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to