git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4399
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void OnIdle( wxIdleEvent& event );
void OnSize( wxSizeEvent& event );
void OnIdle( wxIdleEvent& event );
void OnSize( wxSizeEvent& event );
+ void OnMove( wxMoveEvent& event );
+ void UpdateStatusBar(const wxPoint& pos, const wxSize& size)
+ {
+ wxString msg;
+ msg.Printf(_("pos=(%d, %d), size=%dx%d"),
+ pos.x, pos.y, size.x, size.y);
+ SetStatusText(msg, 1);
+ }
+
wxPanel *m_panel;
DECLARE_EVENT_TABLE()
wxPanel *m_panel;
DECLARE_EVENT_TABLE()
EVT_MENU(MINIMAL_ENABLE_ALL, MyFrame::OnEnableAll)
EVT_SIZE(MyFrame::OnSize)
EVT_MENU(MINIMAL_ENABLE_ALL, MyFrame::OnEnableAll)
EVT_SIZE(MyFrame::OnSize)
+ EVT_MOVE(MyFrame::OnMove)
+
EVT_IDLE(MyFrame::OnIdle)
END_EVENT_TABLE()
EVT_IDLE(MyFrame::OnIdle)
END_EVENT_TABLE()
m_panel->Enable(s_enable);
}
m_panel->Enable(s_enable);
}
+void MyFrame::OnMove( wxMoveEvent& event )
+{
+ UpdateStatusBar(event.GetPosition(), GetSize());
+
+ event.Skip();
+}
+
void MyFrame::OnSize( wxSizeEvent& event )
{
void MyFrame::OnSize( wxSizeEvent& event )
{
- wxString msg;
- msg.Printf( _("%dx%d"), event.GetSize().x, event.GetSize().y);
- SetStatusText(msg, 1);
+ UpdateStatusBar(GetPosition(), event.GetSize());