]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbr95.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / msw / statbr95.cpp
index db9f9fab2461cedadf3223852a7cf9da853b1381..37b9b03f73c7822e6263418f242a23067461b37d 100644 (file)
@@ -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)