[Gtk-sharp-list] Textview keypress event problem

bdubu bwb at fireflysoftware.com
Sun Jul 19 13:39:56 EDT 2009




Michael Hutchinson wrote:
> 
> 2009/4/9 Atis <drake1 at freemail.hu>:
> (The reason you can't capture all the keystroke events is that the
> textview is subscribed to the key events itself in order to capture
> key input, and when it "consumes" keystrokes it prevents the event
> from propagating to other handlers. You can work around this, as Chris
> said, by putting the [GLib.ConnectBefore] on your handler, which
> causes GTK# to insert your handler *before* the widget's own handler).
> 

Unless I've stumbled on some kind of bug or am doing something incorrectly,
etc. it appears that you can in fact capture the TextView's keystroke event
like the OP wanted (without use of [GLib.ConnectBefore]).  Instead of using
the KeyPressEvent you have to use the KeyReleaseEvent.  That said, I agree
that the TextView buffer's Modified flag is the way to go in the OP's
case...
-- 
View this message in context: http://www.nabble.com/Textview-keypress-event-problem-tp22967307p24559111.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list