X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e334d0eac863deef820a2ebba26559892023a5fb..02a1dfbae942c883d8651e34dcfbc5153aabc56e:/demos/life/life.cpp diff --git a/demos/life/life.cpp b/demos/life/life.cpp index cf63a5124a..35bcc5b6b4 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -634,11 +634,14 @@ LifeNavigator::LifeNavigator(wxWindow *parent) sizer1->Add( sizer2 ); sizer1->Add( bs, 0, wxCENTRE | wxSOUTH, 4 ); - // set the miniframe size + // set the panel and miniframe size panel->SetSizer(sizer1); panel->SetAutoLayout(TRUE); - sizer1->Fit(this); - sizer1->SetSizeHints(this); + + sizer1->Fit(panel); + SetClientSize(panel->GetSize()); + wxSize sz = GetSize(); + SetSizeHints(sz.x, sz.y, sz.x, sz.y); // move it to a sensible position wxRect parentRect = parent->GetRect();