[Gtk-sharp-list] TextView scrolling down as text is added.
Phil Durand
draek@shaw.ca
Sat, 17 Jul 2004 16:56:42 -0600
Thank you so much, this helped me to figure out what I needed to do. I
appreciate your time in posting.
Now I'm writing a new post to ask for help on formatting the text that I
output since none of it is documented.
Phil
On Sat, 2004-07-17 at 13:19, Daniel Morgan wrote:
> If you look at the source to sqlsharpgtk\sqlsharpgtk.cs
> http://cvs.hispalinux.es/cgi-bin/cvsweb/sqlsharpgtk/sqlsharpgtk/?cvsroot
> =mono
>
> public void AppendTextWithoutScroll (TextBuffer buffer,
> string text)
> {
> TextIter iter;
> buffer.MoveMark(buf.InsertMark, buffer.EndIter);
> if(text != null)
> {
> if (text.Equals ("") == false)
> {
> iter = buffer.EndIter;
> buffer.Insert (iter, text);
> }
> }
> iter = buffer.EndIter;
> buffer.Insert (iter, "\n");
> }
>
> // WriteLine() to output text to bottom TextView
> // for displaying result sets and logging messages
> public void AppendText (TextBuffer buffer, string text)
> {
> AppendTextWithoutScroll(buffer,text);
> while (Application.EventsPending ())
> Application.RunIteration ();
> textView.ScrollToMark (buf.InsertMark, 0.4,
> true, 0.0, 1.0);
> }
>
> There is also the source to GSIRC by Alp Toker. It may help. However,
> it was coded to old development versions of mono/gtk#.
>
> http://www.atoker.com/gsirc/
>
> -----Original Message-----
> From: gtk-sharp-list-admin@lists.ximian.com
> [mailto:gtk-sharp-list-admin@lists.ximian.com] On Behalf Of Phil Durand
> Sent: Saturday, July 17, 2004 12:28 PM
> To: gtk-sharp-list
> Subject: [Gtk-sharp-list] TextView scrolling down as text is added.
>
>
> I can't seem to be able to wrap my head around how to scroll a TextView
> down when more lines are added beyond the view area. I've seen some
> functions like ScrollToMark, and I saw that there is a InsertMark too,
> but it doesn't actually work for some reason.
>
> Anyone know how to accomplish this in GTK#?
>
> Thanks
> Phil Durand
>
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>