[Gtk-sharp-list] TextView and text style under cursor

Petteri Kautonen petteri.kautonen at pp.inet.fi
Fri Jan 12 04:09:16 EST 2007

I have learned how to apply TextTags on selected text in TextBuffer.
How can I change the style of the text if there is no selection (at the 
cursor location), so everything new written to TextView would come out 
in new style?
It seems that when cursor is moved to an area where no tags have been 
applied, the text style turns back into TextView.DefaultAttributes.

I also have found some bugs?! :
1) Glade.XML does not seem to connect to FontButton.FontSet event.
2) While iterating through TextBuffer, TextIter.ForwardToTagToggle 
endlessly returns true if tag is toggled at the end of TextBuffer:
                TextTag Tt ....
                TextIter Ti = TBuff.StartIter;
                do {
                    // handling....
                    if (Ti.IsEnd) break; // *** this line had to be 
added to avoid endless loop ***
                } while (Ti.ForwardToTagToggle(Tt));

More information about the Gtk-sharp-list mailing list