Under what environment are you runnning your tests? I copied and pasted your
original wxFrame-based code to my Windows 2000 machine with Python 2.2 and
wxPython 2.3.2, and it worked perfectly. Every keypress resulted in
"keypress!" being written to the command line window.
Note that if you run this on Windows with "pythonw", there is no console for
the "print" statements to write to, so it will appear as though it doesn't
work.
···
On Tue, 21 May 2002 07:07:11 -0700, bryan cole <bryan.cole@teraview.co.uk> wrote:
Thanks everyone for the help. Julio's modifications to my example (to
add a wxPanel inside the wxFrame) worked.
Why does a wxPanel capture keypress / wxEVT_CHAR events but not a
wxFrame? Any logic behind this?
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
That's odd; according to Robin and Julio, my original test script
shouldn't work! I tested it and found it didn't work on either wxGTK or
wxMSW (Win 2000 pro) (and yes, I was monitoring std-out) w/ wxPython
2.3.2.1, python2.1
···
On Tue, 2002-05-21 at 17:04, Tim Roberts wrote:
On Tue, 21 May 2002 07:07:11 -0700, bryan cole <bryan.cole@teraview.co.uk> > wrote:
>
>Thanks everyone for the help. Julio's modifications to my example (to
>add a wxPanel inside the wxFrame) worked.
>
>Why does a wxPanel capture keypress / wxEVT_CHAR events but not a
>wxFrame? Any logic behind this?
Under what environment are you runnning your tests? I copied and pasted your
original wxFrame-based code to my Windows 2000 machine with Python 2.2 and
wxPython 2.3.2, and it worked perfectly. Every keypress resulted in
"keypress!" being written to the command line window.
Note that if you run this on Windows with "pythonw", there is no console for
the "print" statements to write to, so it will appear as though it doesn't
work.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
Bryan Cole
Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge
CB4 0WG, United Kingdom.
tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382