nested sub panels

Have solved my problem by statically setting size of frame ie
size=(400..... but is it possible to 'intelligently' size the frame by
trying to fit whats inside it?

<code>
class MyFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, -1, 'Sizer Demo', size=(400,900))
</code>

This should do the trick when you need to dynamically change the size of
your frame (or dialog):

def FitDynamically(self):
  #you can include here any self.ctrl.Show/Hide statements
        self.SetMinSize(self.GetSizer().GetMinSize())
        self.Fit()

Stani

···

--

me schreef:

Have solved my problem by statically setting size of frame ie
size=(400..... but is it possible to 'intelligently' size the frame by
trying to fit whats inside it?

<code>
class MyFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, -1, 'Sizer Demo', size=(400,900))
</code>

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Thanks Stani!!

···

On Mon, 2007-06-18 at 16:21 +0200, Stani's Python Editor wrote:

This should do the trick when you need to dynamically change the size of
your frame (or dialog):

def FitDynamically(self):
  #you can include here any self.ctrl.Show/Hide statements
        self.SetMinSize(self.GetSizer().GetMinSize())
        self.Fit()

Stani
--
http://pythonide.stani.be

me schreef:
> Have solved my problem by statically setting size of frame ie
> size=(400..... but is it possible to 'intelligently' size the frame by
> trying to fit whats inside it?
>
> <code>
> class MyFrame(wx.Frame):
> def __init__(self):
> wx.Frame.__init__(self, None, -1, 'Sizer Demo', size=(400,900))
> </code>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org