[pygtk] multi-line cellrenderertext in C was: Re: VBox in a treeview?

Abel Daniel abli at freemail.hu
Tue Feb 10 21:10:06 WST 2004


Graham Ashton writes:

> Apologies for responding to my own message, but I found a way to achieve
> the same result (multi-line text inside a cell) by drawing a pango
> layout directly onto the treeview widget.

Apparently others want multi-line text in trees, too, so here is my version:
(first release, not really polished, but should work. It should be good 
enough for debugging, but not for end-user release.)
http://abeld.web.elte.hu/wrappedtext.tar.gz

It is a C widget, you need to compile the widget part first. It can
also be edited, the editing is handled by a TextView which is modified
to implement the CellEditable interface. I will use it in an outliner
program I am working on.

I also tried the 'draw a pango layout on the widget' idea, but I
decided against it. Can't exactly remember why, I think I had problems
with setting the cell size. You set it to be big enough, right? So
there will be a varying amount of space below each cell. Doesn't that
look ugly?

-- 
Abel Daniel -- abeld.web.elte.hu




More information about the pygtk mailing list