[Gtk-sharp-list] Noob question about Gtk.ScrolledWindow

Christopher David Howie me at chrishowie.com
Wed May 19 18:40:21 EDT 2010


On 05/19/2010 06:36 PM, Andrew Harris wrote:
> Okay, so it's called textview1, but .Clear and .Text do do not work.  I
> am missing a package or something?  I am trying to clear the TextView
> and replace what it had in it with something else.  Seems pretty simple,
> and it seems as though it is much more simple in Visual Studio than
> Monodevelop.

Simple, perhaps, but less powerful.

GTK+ uses a Model-View design instead of the Winforms design.  In GTK+,
something other than the control contains the data, the control is
responsible only for rendering it.  In Winforms, you attach data
directly to the control, which precludes the possibility of doing some
cool stuff.

To manipulate the contents of the TextView, you must manipulate not the
TextView, but the model providing the data.  This is stored in the
TextView's Buffer property.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses you are
agreeing that I am, by definition, "the intended recipient," and that I
may do whatever I wish with the contents of any message you send me,
unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.


More information about the Gtk-sharp-list mailing list