MinSize

I have a Frame with several components and sizers for layout management, my intention is to make the frame user resizeable, but I don´t want the frame to be so small that it won't show it's components right.
I understand there's a MinSize attribute for each component and frame, and also a Fit function, but I can't see how to use them.

Thanks.

Jorge

Jorge Hojyo wrote:

I have a Frame with several components and sizers for layout management,
my intention is to make the frame user resizeable, but I don´t want the
frame to be so small that it won't show it's components right.

I can't quickly find the code I wrote to do this, but Ithink you can
use:

wxWindow.SetSizeHints()

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Jorge Hojyo wrote:

I have a Frame with several components and sizers for layout management,
my intention is to make the frame user resizeable, but I don´t want the
frame to be so small that it won't show it's components right.

I can't quickly find the code I wrote to do this, but Ithink you can
use:

wxWindow.SetSizeHints()

Yep. You can use it to set the minimum size that the frame will allow itself to be resized to. Optionally it can also set the max size.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Chris Barker wrote:

Jorge Hojyo wrote:

I have a Frame with several components and sizers for layout management,
my intention is to make the frame user resizeable, but I don´t want the
frame to be so small that it won't show it's components right.
   
I can't quickly find the code I wrote to do this, but Ithink you can
use:

wxWindow.SetSizeHints()

        Size = self.GetBestSize()
        self.SetSizeHints(Size[0], Size[1], -1, -1)

This worked for me. Thanks for the tip.

I think this should be default behaviour.

Jorge.