RE: GtkTextView: Applying tags at the cursor
- From: Madhusudan E <madhusudan huawei com>
- To: 'Samuel Lidén Borell' <samuellb bredband net>, gtk-app-devel-list gnome org
- Subject: RE: GtkTextView: Applying tags at the cursor
- Date: Wed, 25 Oct 2006 10:30:52 +0530
Hi,
You can use GtkTextTag.
Tags should be in the GtkTextTagTable for a given GtkTextBuffer before using
them with that buffer.
gtk_text_buffer_create_tag() is the best way to create tags. See gtk-demo
for numerous examples.
Hope this helps.
Rgds,
Madhusudan E
--------------------------------------------------------------------------
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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]