Hi! I’m working from the “form” version of the wx.SizedControls.SizedDialog from the Demo; here’s my code:
class PackageDlg(sc.SizedDialog):
def init(self, parent, id):
sc.SizedDialog.init(self, None, -1, “Package Dialog”,
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
pane = self.GetContentsPane()
pane.SetSizerType("form")
# row 1
st = wx.StaticText(pane, -1, "Package Name")
textCtrl = wx.TextCtrl(pane, -1, "")
textCtrl.SetSizerProps(expand=False)
# row 2
saveCtrl = filebrowse.DirBrowseButton(pane, -1)
saveCtrl.SetLabel("Create where?")
self.SetButtonSizer(self.CreateStdDialogButtonSizer(wx.OK | wx.CANCEL))
self.Fit()
self.SetMinSize(self.GetSize())
Here’s a screenshot of the result:
I would like the dialog width to be governed by the second row, with Package Name’s text control right next to it’s label (I don’t really care much about the alignment of the buttons); I’ve tried many things but can’t get that to happen–please help!
Thanks!
OlyDLG