RE: How to know if "INSERT" is on/off from key-press-event



Thanks for that!

Unfortunately that feature is supported in Gtk 2.4 and above, and I'm
still using Gtk 2.0.9.

Is there any other workaround that can be used to the same effect?

Thanks,
-Gaurav

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Olexiy
Avramchenko
Sent: Thursday, December 23, 2004 12:38 PM
To: Gaurav Jain
Cc: gtk-app-devel-list gnome org
Subject: Re: How to know if "INSERT" is on/off from key-press-event

Gaurav Jain wrote:
Hi,

I need to do special handling for "key-press-event" in a GtkTextView
when some letter is entered while the "INSERT" mode is turned ON.  Is
there a way to know whether INSERT mode is ON or OFF at the time of
receiving a key-press for some other key (I cannot listen to key-press
event of INSERT key itself because my TextView may get created *after*
INSERT has already been pressed).
Hello,
Look at GtkTextView::overwrite_mode field, non-zero means that "insert" 
mode is on. There's also "toggle-overwrite" signal for this object which

is activated by binding on <Insert> key.

        Olexiy

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]