[pygtk] Styling a text view across the visible line
Scott Ferguson
scottwferg at gmail.com
Sat Oct 10 06:05:50 WST 2009
Hi,
I'm trying to build an integrated diff tool for an app that I'm writing, and
I am styling the text to make certain parts of the diff more visible (adds
are green, removes are red, etc). Typical look and feel of a diff viewer.
The styling includes a background and foreground color. Currently I'm
iterating over each line of the gtk.TextBuffer, creating an ending iterator
at the next line, and styling everything between the line start, and the
start of the following line. My issue is that I would like the background
color to carry straight across the gtk.TextView, not end where the line ends
(on the '\n' character). A single line should have a highlight from left to
right.
Is this possible with a stock gtk.TextView? My current formatting function
can be found here: http://gist.github.com/206387
Regards,
Scott Ferguson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20091009/1e05749e/attachment.htm
More information about the pygtk
mailing list