[pygtk] How do i set the text of a row in a TreeView to red?

Phillip phillip at chile.com
Sun Mar 7 10:48:15 WST 2004


This works just great.=20
Thank you!

El s=C3=A1b, 06-03-2004 a las 12:20, Walter Anger escribi=C3=B3:
> On Sat, 6 Mar 2004 08:21:00 +0100
> Walter Anger <WalterAnger at aon.at> wrote:
>=20
> > On Sat, 06 Mar 2004 00:38:53 -0300
> > Phillip <phillip at chile.com> wrote:
> >=20
> > have a look at the appended code. it is a "translation to python" of
> > one of the examples in the treeview-tutorial of Tim-Philipp M=C3=BCller=
.
> > =20
> > 	renderer.set_property("foreground","red")
> >=20
> > does the trick.
>=20
> got the information, that the code only changes the textcolor of a whole
> column. it is some months ago, that i made it. it was thoughtless,
> sorry.
>=20
> a supplement, a simple code, how one can achieve colorization for every
> cell(row) is in the first attachment. (change 'background' to
> 'foreground' to colorize text instead of the cell)
>=20
> the second attachment is a more complex one, using
> gtk.TreeViewColumn.set_cell_data_func, again a trancoding from one of
> the examples in the treeview-tutorial.
>=20
> hth
>=20
>=20
> walter
>=20
>=20
> ______________________________________________________________________
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



More information about the pygtk mailing list