On Fri, 29 Sep 2000, Dave Belfer-Shevett wrote:

> That's sort of along the lines of what I was thinking, but do I simply
> put in Glade an event 'clicked' and specify a handler for another button
> elsewhere?
> 
> Can you give me a quick code example?

With accelerators, you specify the object and signal which will be emitted
when the particular key is pressed.  Usually you connect an accelerator to
some action that could be performed in some other way (eg. clicking on a
menu item or button).  So you would set up the accelerator, and then
define a handler for the signal on the target object.

If you just want to do something special for a particular widget, then
using the key_press_event signal is the correct aproach.  You look at the
attributes of the event object to see which key was pressed.  Return TRUE
if you handled the event yourself, and FALSE otherwise.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to