wxStaticBoxSizer weirdness
Vadim Zeitlin
vadim at wxwidgets.org
Wed Mar 5 14:49:57 PST 2008
On Wed, 5 Mar 2008 15:39:19 -0500 Martin Cote <cote.martin at gmail.com> wrote:
MC> I have this function which creates the static box:
Instead you should have a function which creates a sizer (wxStaticBoxSizer
in this case).
MC> In my wxFrame subclass' constructor, I have this:
MC>
MC> wxSizer * const sizer = new wxBoxSizer( wxVERTICAL ) ;
MC> sizer->Add( MakeStaticBox( this ) , 1 , wxEXPAND | wxALL , 5 ) ;
And here you should add the sizer, and not just its box, to the top-level
sizer. Basically don't think about the static box at all, it's just a
detail at this level, the main thing is the sizer.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list