GtkTextView: Applying tags at the cursor



Hi,

I'm working on a web site creation software that uses Gtk, Glade and
Python for the UI. I'm using the GtkTextView widget to let the user edit
text with basic formatting but I have a question:

How do I apply a tag at the cursor so that inserted text gets it's
formatting? Right now I surround the cursor with two zero-width spaces
(an invisible Unicode character) and then I apply the tag to the spaces.
This gives new text the right formatting, but it's an ugly solution that
has some bugs...

Kind regards,
Samuel Liden Borell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]