You are not logged in.
I found a few examples, but all of them show how to change the background color while creating the TreeView, but I need to change it dynamically.
For example, lets imagine I have a TreeView:
ID Name Score
------------------------------------------
1 John 10
2 Michael 5
3 George 90
How do I change row X background to red as soon as the user enters (let it be a simple text box) ID he wants to see highlighted?
Last edited by GERUM (2013-10-22 17:32:59)
Offline
As far as I understand the documentation of TreeView and its related objects, the background can only be changed on CellRenderers: Meaning that if you instantiate a CellRenderer for each cell (they dont seem to span rows, only columns) you could change backgrounds with:
CellRenderer.set_property('cell-background','color')
Another possibility would be to use "Pango markup" and change cell values, but I don't believe that the output is as neat.
http://www.pygtk.org/pygtk2tutorial/sec … erers.html has some information on the subject.
Last edited by HenrikJuul (2013-10-22 14:49:31)
Offline
Found it!
Offline