[Gtk-sharp-list] TextView scrolling down as text is added.
Daniel Morgan
danielmorgan@verizon.net
Sat, 17 Jul 2004 15:19:02 -0400
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