wxPython: Keyboard events and TreeCtrl

jean-michel bain-cornu jmbc at nospam.fr
Mon Jun 12 02:36:33 EDT 2006


> Am I supposed to connect the method to the Frame somehow? Or does it
> automatically get called when the user hits Ctrl-I, regardless of the
> fact that no other methods call OnKeyDown?

I think it must be connected to the treectrl.
One line or a combination of :
	self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
	self.Bind(wx.EVT_KEY_UP, self.OnKeyUp)
	self.Bind(wx.EVT_CHAR, self.OnChar)
That's coming from the demo (process and events->key events).

If it does not work, it'd be helpful if you join your program to a next 
post, something that we can test without having to write a demo 
specifically.

Regards,
jm



More information about the Python-list mailing list