modified wxFrame/Univ to send wxSizeEvent when adding/removing bars (because client area changes)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-10-06 22:45:51 +00:00
parent 0aa236cddc
commit 6821401b1b
2 changed files with 41 additions and 1 deletions

View File

@@ -76,6 +76,13 @@ void wxFrame::OnSize(wxSizeEvent& event)
event.Skip();
}
void wxFrame::SendSizeEvent()
{
wxSizeEvent event(GetSize(), GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
#if wxUSE_MENUS
void wxFrame::PositionMenuBar()
@@ -90,6 +97,18 @@ void wxFrame::PositionMenuBar()
}
}
void wxFrame::DetachMenuBar()
{
wxFrameBase::DetachMenuBar();
SendSizeEvent();
}
void wxFrame::AttachMenuBar(wxMenuBar *menubar)
{
wxFrameBase::AttachMenuBar(menubar);
SendSizeEvent();
}
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
@@ -104,6 +123,14 @@ void wxFrame::PositionStatusBar()
}
}
wxStatusBar* wxFrame::CreateStatusBar(int number, long style,
wxWindowID id, const wxString& name)
{
wxStatusBar *bar = wxFrameBase::CreateStatusBar(number, style, id, name);
SendSizeEvent();
return bar;
}
#endif // wxUSE_STATUSBAR
wxPoint wxFrame::GetClientAreaOrigin() const