Setting a GTKText signal



After looking at a melange of docs, I'm a bit confused on this one:

I would like to be able to bind a signal to pressing the Enter/Return
key in a GTKText widget.  Which of the following approaches is the right
one:

1) Change the "activate" signal's binding from Ctrl-Return to Return

2) Write my own signal, tie it to the Return key, and attach it to the
widget   

3) Write a new widget/class (is there a difference?) that's a subclass
of GTKText, with its own special signal


I haven't been able to find anything on how to bind signals to key-press
events.  (I fully admit that I may have overlooked something.)  Does
anyone have any pointers?

Thank you for your help.


--Mike



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