use SendSizeEvent() to resize the button correctly after reparenting under MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a4f25aef35
commit
33c8cf5e8c
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user