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

Mike Kestner mkestner at novell.com
Fri Jan 12 14:36:44 EST 2007


On Fri, 2007-01-12 at 11:09 +0200, Petteri Kautonen wrote:
> Hi,
> 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));

Please open bug reports with as minimal a sample as possible to
reproduce the bugs at bugzilla.ximian.com module gtk#.

Thanks,
-- 
Mike Kestner  <mkestner at novell.com>
SUSE® Linux Enterprise 10
Your Linux is ready™
www.novell.com/linux



More information about the Gtk-sharp-list mailing list