GtkTextTag : Tag property not retained



Hi,
 
I am applying a particular Tag to a text buffer after creating it in its
tag table. To apply the tag, I'm using something like:
gtk_text_buffer_apply_tag(tBuf, textTag, &startIter, &endIter);
 
On running the program all looks fine.  For example, if I set the
property of some text that I select to BOLD, the text becomes bold.
 
But after the operation, if I try to type some new text immediately
following the changed tagged text (the one that became bold), the new
text does not have the "bold" property, while I think it should.
 
To illustrate further, suppose I have the following text initially in a
text buffer:
 
"now is the time for all good men"
 
I select the text "time" and make it bold.  Then "time" becomes bold,
correctly.
 
But if I now start to type in some text by putting the cursor just after
the "e" in "time", the new text I type does not have the BOLD property
(and it should, right?).  Note that if I insert "in between" the word
"time" which was already bold, the new text does have the bold property.
 
Why is the subsequent text not keeping the tag property then?  Any idea
what is the solution to this problem?
 
Thanks,
-Gaurav



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