I'm still having problems getting my application to acknowledge keyboard events. I've tried this on two machines, both linux boxes (apparently using wxGTK). Here's my latest attempt...
---start code---
#!/usr/bin/env python
from wxPython.wx import *
class Form1(wxPanel):
def __init__(self, parent, id):
wxPanel.__init__(self, parent, id)
self.My_Text = wxTextCtrl(self, wxNewId(), '', wxPoint(20, 20))
What am I doing wrong? Any help would be GREATLY appreciated... TIA
···
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
On Mon, 2004-09-06 at 20:50, jahurt644@netscape.net wrote:
I'm still having problems getting my application to acknowledge keyboard events. I've tried this on two machines, both linux boxes (apparently using wxGTK). Here's my latest attempt...
---start code---
#!/usr/bin/env python
from wxPython.wx import *
class Form1(wxPanel):
def __init__(self, parent, id):
wxPanel.__init__(self, parent, id)
self.My_Text = wxTextCtrl(self, wxNewId(), '', wxPoint(20, 20))
I'm still having problems getting my application to acknowledge keyboard events. I've tried this on two machines, both linux boxes (apparently using wxGTK). Here's my latest attempt...
---start code---
#!/usr/bin/env python
from wxPython.wx import *
class Form1(wxPanel):
def __init__(self, parent, id):
wxPanel.__init__(self, parent, id)
self.My_Text = wxTextCtrl(self, wxNewId(), '', wxPoint(20, 20))
What am I doing wrong? Any help would be GREATLY appreciated... TIA
Only the widget with the keyboard focus will generate CHAR or KEY events, and since they are not command events they are delivered only to the window they happen to, not their parents. Try binding the EVT_CHAR event to the text ctrl by using it for the first parameter of EVT_CHAR().
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!