]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/buttons.py
Patch from Andrea: fixes no page chang* events with mouse right click,
[wxWidgets.git] / wxPython / wx / lib / buttons.py
index ea8fea98b5a49ae875e2ad72c6e694ebac0ed817..11c3e77860583b9c2fde845269dce5c5fca6c4e7 100644 (file)
@@ -347,14 +347,14 @@ class GenButton(wx.PyControl):
 
 
     def OnKeyDown(self, event):
-        if self.hasFocus and event.KeyCode() == ord(" "):
+        if self.hasFocus and event.GetKeyCode() == ord(" "):
             self.up = False
             self.Refresh()
         event.Skip()
 
 
     def OnKeyUp(self, event):
-        if self.hasFocus and event.KeyCode() == ord(" "):
+        if self.hasFocus and event.GetKeyCode() == ord(" "):
             self.up = True
             self.Notify()
             self.Refresh()
@@ -551,7 +551,7 @@ class __ToggleMixin:
         event.Skip()
 
     def OnKeyUp(self, event):
-        if self.hasFocus and event.KeyCode() == ord(" "):
+        if self.hasFocus and event.GetKeyCode() == ord(" "):
             self.up = not self.up
             self.Notify()
             self.Refresh()