[Gtk-sharp-list] ScrolledWindow Events
Davy Brion
ralinx@pandora.be
Sat, 28 Feb 2004 19:54:33 +0100
On Sat, 2004-02-28 at 13:49, Jeremiah McElroy wrote:
> I'm working on a Debug Window class for an application I'm writing.
> I've managed to hook up some events and get the resulting window to
> appear and hold text (TextView inside a ScrolledWindow). However, when
> I append text to the TextBuffer associated with TextView.Text, the
> buffer will eventually become larger than the viewport of the
> scrolledwindow.
>
> I have been trying to figure out how to get the ScrolledWindow to scroll
> down when new text is entered. Any suggestions would be appreciated.
> I've been looking through MonoDoc, but I haven't had much luck yet.
Hi, i believe this will solve your problem:
// add the text to the TextBuffer
buffer.Insert(buffer.EndIter,strMessage);
// scroll the textview to the insertion mark
view.ScrollMarkOnscreen(buffer.InsertMark);
hope this helps,
Davy Brion