[Gtk-sharp-list] One Simple Cuestion, TextView

George Farris farrisg@mala.bc.ca
05 Mar 2003 15:53:27 -0800


If you want to get a widget from a Glade.XML instance do this:
phbd = (Gtk.Dialog) gsxml.GetWidget("PhbookDialog");

where gsxml is your Glade.XML instance.  

You can also reference it like so:
phbd = (Gtk.Dialog) gsxml["PhbookDialog"];


On Wed, 2003-03-05 at 15:27, Daniel Morgan wrote:
> To insert a line of text:
> 
> string myText = "blah, blah, blah\n";
> myTextBuffer.Insert (sqlTextBuffer.EndIter, myText, myText.Length);
> 
> To clear:
> 
> sqlTextBuffer.Delete (myTextBuffer.StartIter, myTextBuffer.EndIter);
> 
> I'm not sure how to get the TextBuffer from the TextView:
> TextBuffer myTextBuffer = myTextView.Buffer;
> 
> I'm not sure how to get the TextBuffer from glade since I don't use it.
> 
> -----Original Message-----
> From: gtk-sharp-list-admin@lists.ximian.com
> [mailto:gtk-sharp-list-admin@lists.ximian.com]On Behalf Of Jorge Martin
> Sent: Wednesday, March 05, 2003 5:14 PM
> To: GTK Sharp list
> Subject: [Gtk-sharp-list] One Simple Cuestion, TextView
> 
> 
> Hi guys, I'm new to GTK, I've try GTK+, GTK-- and Mono and believe me,
> mono is the best, but not full documented yet, that's why i'm asking
> these.
> 
> I'm using Glade to make de GUI and make my program.cs to import it the
> same way "Lee Mallabone" do.
> 
> Now I have two TreeView and one TextView on a form, my question is how
> can I write something on the TextView, and how to clean it.
> 
> Thx
--