gtk-textbuffer

Inserting bold characters in pyGTK's TextView/TextBuffer

不羁岁月 提交于 2019-12-10 15:59:11
问题 I have a TextView and a TextBuffer associated with it. When the user presses Ctrl+b, I would like the text to be start typing in bold until user presses Ctrl+b again. I was trying my own methods, which weren't working, and then I found this post on the mailing list: http://www.daa.com.au/pipermail/pygtk/2009-April/016951.html Same issue as me, and the solution someone gave is Your application will have to handle the bookkeeping required to manage the tags in the TextBuffer. When text is