]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Validator.py
Test for KDE and GNOME using session manager vendor.
[wxWidgets.git] / wxPython / demo / Validator.py
index 688712c01567ba1d0187bd7e19bbf8ba8dcb99dd..0b83c95595ca323423c8afdd519bc567b8b0712c 100644 (file)
@@ -34,7 +34,7 @@ class MyValidator(wx.PyValidator):
 
 
     def OnChar(self, event):
-        key = event.KeyCode()
+        key = event.GetKeyCode()
 
         if key < wx.WXK_SPACE or key == wx.WXK_DELETE or key > 255:
             event.Skip()
@@ -193,7 +193,7 @@ class TestValidateDialog(wx.Dialog):
         b.SetDefault()
         buttons.AddButton(b)
         buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
-        buttons.Finalise()
+        buttons.Realize()
 
         border = wx.BoxSizer(wx.VERTICAL)
         border.Add(fgs, 1, wx.GROW|wx.ALL, 25)