]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Validator.py
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / wxPython / demo / Validator.py
index d31296c7be9c0a18746d54d74fd2ecff09b39ff7..31dd044967e0243b81aaf10bd6d126db150fe8d1 100644 (file)
@@ -188,11 +188,12 @@ class TestValidateDialog(wx.Dialog):
         fgs.Add(wx.TextCtrl(self, -1, "", validator = TextObjectValidator()))
 
 
-        buttons = wx.BoxSizer(wx.HORIZONTAL)
-        b = wx.Button(self, wx.ID_OK, "Okay")
+        buttons = wx.StdDialogButtonSizer() #wx.BoxSizer(wx.HORIZONTAL)
+        b = wx.Button(self, wx.ID_OK, "OK")
         b.SetDefault()
-        buttons.Add(b, 0, wx.ALL, 10)
-        buttons.Add(wx.Button(self, wx.ID_CANCEL, "Cancel"), 0, wx.ALL, 10)
+        buttons.AddButton(b)
+        buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
+        buttons.Realize()
 
         border = wx.BoxSizer(wx.VERTICAL)
         border.Add(fgs, 1, wx.GROW|wx.ALL, 25)