[pygtk] How to change CellRendererToggle's background color
hvastani at vt.edu
hvastani at vt.edu
Wed Aug 16 22:20:52 WST 2006
I dont know if this answers your question but see
http://www.daa.com.au/pipermail/pygtk/2005-July/010723.html
Quoting Mauricio Tellez <mauricio.tellez at gmail.com>:
> Hi, I have a TreeView with 4 columns, the first and second has
> CellRendererText and the thirth and fourth are CellRendererToggle. When the
> user modify the value of any cell, I want to change the row's background
> color. For the CellRendererText I use something like this:
>
> myRender = gtk.CellRendererText()
> myCol = gtk.TreeViewColumn('My title', myRender, text=x, background=y)
>
> this work fine and my cell is colored, but when I tried this:
>
> myRender = gtk.CellRendererToggle()
> myCol = gtk.TreeViewColumn('My title', my Render, active=v, activatable=w,
> background=z)
>
> pygtk complains that CellRendererToggle don't have a background property. So
> my first 2 columns are colored but the last 2 don't. How can I fix this?
> By the way, If I put only CellRendererText and change the background color,
> The entire row's color isn't change, only the cell's color are change. I
> mean, If I my row has 3 cell, I get 3 cell colored and this make the ilusion
> of a colored row, but If you pay atention, there is a white line between
> each cell. Is there a way to actually change's the entire row color to look
> like the alternate color of gtk themes? Thanks for the help.
>
> --
> Mauricio Tellez
>
More information about the pygtk
mailing list