[Gtk-sharp-list] events and TextView/Buffer
Lee Mallabone
gnome@fonicmonkey.net
07 Sep 2002 17:21:05 +0100
Hi,
First, I'm pretty new to C# as a language, and Gtk#, despite being
reasonably confident with standard Gtk+, so if this is an FAQ, or a dumb
question, please direct me to the right place.
I'm trying to use Gtk.TextView in a C# app with mono on linux. I want to
run some code when the user enters text in the text widget.
The way I'm trying to handle the event in my code is with a function
that looks like this:
private void TextWasInserted(object sender, InsertAtCursorArgs e)
{
Console.WriteLine("Event handled");
}
and then I try and hook in the event handler with:
view.InsertAtCursor += new InsertAtCursorHandler(TextWasInserted);
However, nothing happens. Should this work? Is this the wrong approach?
I've tried similar things and attempted event handling on the TextBuffer
as well, but events on the TextBuffer give Glib-GObject-CRITICAL
messages on the console.
If what I'm trying to do just isn't implemented yet, feel free to direct
me to somewhere I can help implement it...
Regards,
--
Lee Mallabone.
http://www.FindARandomPub.com/