X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57f4f9255e3d70e219e6eabd68c3990c0f471f81..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/msw/statbr95.cpp diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index db9f9fab24..37b9b03f73 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -119,12 +119,28 @@ bool wxStatusBar95::Create(wxWindow *parent, InheritAttributes(); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR)); + + // we must refresh the frame size when the statusbar is created, because + // its client area might change + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame ) + { + frame->SendSizeEvent(); + } return true; } wxStatusBar95::~wxStatusBar95() { + // we must refresh the frame size when the statusbar is deleted but the + // frame is not - otherwise statusbar leaves a hole in the place it used to + // occupy + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame && !frame->IsBeingDeleted() ) + { + frame->SendSizeEvent(); + } } void wxStatusBar95::SetFieldsCount(int nFields, const int *widths)