X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d440dda1e08192ca77b3f046e695e27f23cccd8e..ee682a94cb9ea835c9b74a12f17b0fb63f43dcce:/samples/minifram/minifram.cpp diff --git a/samples/minifram/minifram.cpp b/samples/minifram/minifram.cpp index ebb4d138ba..796773a8b7 100644 --- a/samples/minifram/minifram.cpp +++ b/samples/minifram/minifram.cpp @@ -155,6 +155,9 @@ void MyMiniFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) void MyMiniFrame::OnReparent(wxCommandEvent& WXUNUSED(event)) { button->Reparent( main_frame ); + + // we need to force the frame to size its (new) child correctly + main_frame->SendSizeEvent(); } // MyMainFrame @@ -185,7 +188,12 @@ void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event)) "You don't want to make this button an orphan, do you?", "You got to be kidding"); else + { button->Reparent( mini_frame ); + + // same as above + mini_frame->SendSizeEvent(); + } }