wxStaticBox Fixed, another issue

Hello again,

I did manage to cope with the static box. Here's the code:

class MyDialog(wxDialog):
     def __init__(self):
         wxDialog.__init__(self, None, -1, "Make Order")
         self.combo = wxComboBox(self, -1, "Choose a name...", (-1, -1),
(-1, -1))
         self.staticbox = wxStaticBox(self, -1, "Choose A Customer")
         self.box = wxStaticBoxSizer(self.staticbox, wxVERTICAL)
         self.box.SetMinSize((100,100))
         self.box.Add(self.combo, 1)
         self.SetSizer(self.box)
         self.box.Fit(self)
         self.ShowModal()

The issue with that code is that the dialog won't set his own size
bigger than the sizer and the static box border is very hard to see. Any
help is greatly appreciated.

Thanks,
gamehack

place the StaticBoxSizer inside another sizer and give it some border.
like in:

self.border = wx.BoxSizer(wx.VERTICAL)
self.border.Add(self.box, 1, wx.EXPAND|wx.ALL, 5)
self.SetSizerAndFit(self.border)

instead of:

···

On Mon, 17 Jan 2005 22:06:44 +0000, Milen Dzhumerov <gamehack@gmail.com> wrote:

         self.SetSizer(self.box)
         self.box.Fit(self)

--
Peter Damoc
jack of all trades, master of none
http://www.sigmacore.net/