mail-archives/gtk-sharp-list/2004-February/003540.html

76 строки
2.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] ScrolledWindow Events
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:ralinx%40pandora.be">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="003538.html">
<LINK REL="Next" HREF="003541.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] ScrolledWindow Events
</H1>
<B>Davy Brion
</B>
<A HREF="mailto:ralinx%40pandora.be"
TITLE="[Gtk-sharp-list] ScrolledWindow Events">ralinx@pandora.be
</A><BR>
<I>Sat, 28 Feb 2004 19:54:33 +0100</I>
<P><UL>
<LI> Previous message: <A HREF="003538.html">[Gtk-sharp-list] ScrolledWindow Events
</A></li>
<LI> Next message: <A HREF="003541.html">[Gtk-sharp-list] ScrolledWindow Events
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3540">[ date ]</a>
<a href="thread.html#3540">[ thread ]</a>
<a href="subject.html#3540">[ subject ]</a>
<a href="author.html#3540">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Sat, 2004-02-28 at 13:49, Jeremiah McElroy wrote:
&gt;<i> I'm working on a Debug Window class for an application I'm writing.
</I>&gt;<i> I've managed to hook up some events and get the resulting window to
</I>&gt;<i> appear and hold text (TextView inside a ScrolledWindow). However, when
</I>&gt;<i> I append text to the TextBuffer associated with TextView.Text, the
</I>&gt;<i> buffer will eventually become larger than the viewport of the
</I>&gt;<i> scrolledwindow.
</I>&gt;<i>
</I>&gt;<i> I have been trying to figure out how to get the ScrolledWindow to scroll
</I>&gt;<i> down when new text is entered. Any suggestions would be appreciated.
</I>&gt;<i> I've been looking through MonoDoc, but I haven't had much luck yet.
</I>
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
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="003538.html">[Gtk-sharp-list] ScrolledWindow Events
</A></li>
<LI> Next message: <A HREF="003541.html">[Gtk-sharp-list] ScrolledWindow Events
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3540">[ date ]</a>
<a href="thread.html#3540">[ thread ]</a>
<a href="subject.html#3540">[ subject ]</a>
<a href="author.html#3540">[ author ]</a>
</LI>
</UL>
</body></html>