Use wx.StdDialogButtonSizer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-02-07 19:27:56 +00:00
parent f35d1a03b2
commit 0f9da07463
3 changed files with 28 additions and 25 deletions

View 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.Finalise()
border = wx.BoxSizer(wx.VERTICAL)
border.Add(fgs, 1, wx.GROW|wx.ALL, 25)