[pygtk] [gtk.TextView] copy text to buffer
frpaul
frpaul at yandex.ru
Tue Feb 16 01:31:49 WST 2010
Hello, everyone!
I set text to TextView vidget and add style with tags like this:
tag_table = self.textbuffer.get_tag_table()
styled_text = gtk.TextTag()
styled_text.set_property("font", self.font)
tag_table.add(styled_text)
iter, iter2 = self.textbuffer.get_bounds()
self.textbuffer.apply_tag(styled_text, iter, iter2)
It all works out nicely, but when I copy the text into buffer (for
example using ctrl+Insert hot-key) the style is lost, only the text
itself is copied. Is there a way to fix this, please?
Regards,
Paul.
More information about the pygtk
mailing list