From b538bf7e2a3cd5f249c6a58f3e37b8d38e84ef07 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Apr 2002 18:49:47 +0000 Subject: [PATCH] Corrected the sizer code for the navigation tool window -- it was mixing panel and frame. Now the panel is sized, and the resulting fit used to resize the frame. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/life/life.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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(); -- 2.45.2