[pygtk] colored cell

John Stowers john.stowers.lists at gmail.com
Fri Sep 28 04:49:33 WST 2007


On 9/28/07, John Hunter <jdh2358 at gmail.com> wrote:
> I have a gtk.Treeview and I want to format negative numbers in red, as
> you can do in excel for example.  I tried to use pango markup, as in
> the example below, but was unsuccessful -- what is the best way to do
> this?
>

I believe if you use pango markup in the cells you must use the markup
attribute and not the text attribute

column = gtk.TreeViewColumn('Ticker', gtk.CellRendererText(),
                           markup=0)


More information about the pygtk mailing list