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

@@ -69,17 +69,19 @@ class MultipleChoiceDialog(wx.Dialog):
ok = wx.Button(self, wx.ID_OK, "OK")
ok.SetDefault()
cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
lc = layoutf.Layoutf('t=t10#1;l=l5#1;r=r5#1;h!%d' % (height,), (self,))
stat.SetConstraints(lc)
lc = layoutf.Layoutf('t=b10#2;l=l5#1;r=r5#1;b=t5#3', (self, stat, ok))
self.lbox.SetConstraints(lc)
lc = layoutf.Layoutf('b=b5#1;x%w25#1;w!80;h*', (self,))
ok.SetConstraints(lc)
lc = layoutf.Layoutf('b=b5#1;x%w75#1;w!80;h*', (self,))
cancel.SetConstraints(lc)
dlgsizer = wx.BoxSizer(wx.VERTICAL)
dlgsizer.Add(stat, 0, wx.ALL, 4)
dlgsizer.Add(self.lbox, 1, wx.EXPAND | wx.ALL, 4)
btnsizer = wx.StdDialogButtonSizer()
btnsizer.AddButton(ok)
btnsizer.AddButton(cancel)
btnsizer.Finalise()
dlgsizer.Add(btnsizer, 0, wx.ALL | wx.ALIGN_RIGHT, 4)
self.SetSizer(dlgsizer)
self.SetAutoLayout(1)
self.lst = lst