[pygtk] Styling a text view across the visible line
Scott Ferguson
scottwferg at gmail.com
Sat Oct 10 06:39:50 WST 2009
Perfect. Thanks!!
Regards,
Scott Ferguson
On Fri, Oct 9, 2009 at 5:35 PM, John Finlay <finlay at moeraki.com> wrote:
> Scott Ferguson wrote:
>
>> 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
>>
>> Try setting the 'paragraph-background' property of the tag.
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20091009/4aeea2a7/attachment.htm
More information about the pygtk
mailing list