[pygtk] Text Hiding in gtk.TextView / TextBuffer
Wildemar Wildenburger
wildemar at freakmail.de
Sat Dec 8 08:34:32 WST 2007
Hi :)
Is there an easy way to hide certain lines of a buffer in a TextView?
That is, I would like to have a TextView that only displays certain
lines of its buffer (most useful for "code folding" and "narrowing",
among other things.). Any ideas or pointers?
I could imagine just using another buffer that only contains the portion
of the buffer that is currently relevant, but then I would lose some MVC
functionality (say, different views on the same file, but narrowed to
different parts of the buffer wouldn't work). Maybe implementing an
intermediate buffer that acts like a view on a buffer (in the SQL sense)
is the best option, but that seems like a lot of work; I hope that there
is an easier way.
Thanks for any hints.
/W
More information about the pygtk
mailing list