[MonoDevelop] Gtk.TextView question

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Jul 9 17:04:41 EDT 2010


On Fri, Jul 9, 2010 at 2:57 PM, Aniello Di Nardo
<dinardo at creasoftware.net> wrote:
> Hi!
>
> I'm building a little chat mono gtk# application and I've some question
> about the Gtk.TextView.
>
> I use the follow code to add a line into the Gtk.TextView widget...
>
> ...
> Gtk.TextView txvMonitor = new Gtk.TextView()
> ...
> void addToMonitor(string textToAdd) {
>    TextIter mIter = txvMonitor.Buffer.EndIter;
>    txvMonitor.Buffer.Insert(ref mIter, textToAdd);
>    txvMonitor.Buffer.EndIter.
>    txvMonitor.ScrollToIter(txvMonitor.Buffer.EndIter, 0, false, 0, 0);
> }
>
>
> when the text fill the visible area of the Gtk.TextView widget, the scroll
> bars do not move...
>
> why the refresh of the Gtk.TextView widget occour only (or any time) when i
> click on it?
>
> often... the application crash when "void addToMonitor" occour! Why? There
> is something wrong with the code?
>
> is possible set the background and the foreground color of the Gtk.TextView
> widget?
>
> There is a more simple widget as the "single-line Entry widget", but
> multi-line width the scroll bars?
>
> Thanks for any replies?

Are you adding the text from a thread?

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list