X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34a544a635f3bac9320e6eb41aaaa5a5e8d1f5a4..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/demo/Dialog.py diff --git a/wxPython/demo/Dialog.py b/wxPython/demo/Dialog.py index e9dc898a76..8897c26e86 100644 --- a/wxPython/demo/Dialog.py +++ b/wxPython/demo/Dialog.py @@ -63,22 +63,23 @@ class TestDialog(wx.Dialog): line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL) sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5) - box = wx.BoxSizer(wx.HORIZONTAL) - + btnsizer = wx.StdDialogButtonSizer() + if wx.Platform != "__WXMSW__": btn = wx.ContextHelpButton(self) - box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5) - - btn = wx.Button(self, wx.ID_OK, " OK ") - btn.SetDefault() + btnsizer.AddButton(btn) + + btn = wx.Button(self, wx.ID_OK) btn.SetHelpText("The OK button completes the dialog") - box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5) + btn.SetDefault() + btnsizer.AddButton(btn) - btn = wx.Button(self, wx.ID_CANCEL, " Cancel ") + btn = wx.Button(self, wx.ID_CANCEL) btn.SetHelpText("The Cancel button cnacels the dialog. (Cool, huh?)") - box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5) + btnsizer.AddButton(btn) + btnsizer.Realize() - sizer.Add(box, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) + sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) self.SetSizer(sizer) self.SetAutoLayout(True)