[pygtk] Enabling markup for a TreeViewColumn

Kurt Symanzik kurt at kbsymanzik.org
Wed Mar 7 11:48:49 WST 2007


Bryant Huang wrote:
> Hello,
> 
> I've spent the last 3 hours trying to figure out how to highlight text 
> in a TreeView cell. I found the example at 
> http://www.pygtk.org/pygtk2tutorial/sec-CellRenderers.html#sec-CellRendererTextMarkup 
> but have been unable to replicate the same behavior in my own project.
> 

I may have spoken too soon.  You may also need to not use the text 
field.  For example, change:

column = gtk.TreeViewColumn(title, renderer, text=column_id, markup=0)

to this:

column = gtk.TreeViewColumn(title, renderer, markup=column_id)

Hope that solves it.

Kurt

-- 
Kurt Symanzik
kurt at kbsymanzik.org
Skype id: ksymanzik
http://kbsymanzik.org


More information about the pygtk mailing list