[wxPython-users] Capturing keydown events
Buran, Brad
Brad_Buran at meei.harvard.edu
Mon Sep 24 05:41:15 PDT 2007
Hi Robin,
Thanks for the suggestion. I tried that, but the FigureCanvasWxAgg does
not seem to accept "style" as a keyword. Since this canvas is embedded
in a wx.Panel, would there be any way of preventing the canvas from
receiving focus and capturing user input at the panel level? I think I
tried that once by using SetFocus() which did not seem to work either.
Orest
> -----Original Message-----
> From: Robin Dunn [mailto:robin at alldunn.com]
> Sent: Friday, September 21, 2007 2:47 PM
> To: wxPython-users at lists.wxwidgets.org
> Subject: Re: [wxPython-users] Capturing keydown events
>
> Orest Kozyar wrote:
>
> > I've tried subclassing FigureCanvasWxAgg and defining
> key_press_event
> > (which doesn't seem to work) and overriding _onKeyDown (which still
> > does not capture the keys I need). Something weird seems to be
> > happening to these keys, and was wondering if anyone could help me?
> >
> > I am able to detect the EVT_KEY_UP for these three keys.
> Just not the
> > key down ones.
>
> Try using the wx.WANTS_CHARS style on the canvas too.
>
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
More information about the wxpython-users
mailing list