From: Bo G. <bo...@sy...> - 2005-03-04 19:00:35
|
I have been trying to piece together how to do a sizer in a CustomDialog. So far it doesn't work. If I leave the resource button positions as is, the buttons always appear there. If I comment out the resource button positions, the buttons end up both in the top left corner of the dialog, on top of each other. Here is the dialog's __init__ method in its current state (I've tried many variations of the same code). Part of the problem is my lack of understanding of the sizer methods, but possibly also how to add the components of the dialog to the sizer. def _init_(self, mainBG): "Initialise the project dialog" model.CustomDialog.__init__(self, mainBG) self.parent = mainBG sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.components.buttonCreate,flag=wx.GROW) sizer.Add(self.components.buttonOpen,flag=wx.GROW) sizer.Fit(self) self.SetSizer(sizer) self.SetAutoLayout(true) self.Layout() Thanks for any help. Bo |