[pygtk] layout + key-press-event

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Thu Jul 20 20:32:08 WST 2006


On Qui, 2006-07-20 at 15:12 +0200, Tobias Bengtsson wrote:
> Hi, I'm trying to trap a key-press-event in a Layout.
> I've previously successfully trapped the event in an Entry, but now I 
> need to trap it in the surrounding Layout. The attached minimal code 
> does not work, why?

This is missing:

l.set_flags(gtk.CAN_FOCUS)
l.grab_focus()

Cheers.

-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.



More information about the pygtk mailing list