Fixes for wxUSE_STATUSBAR.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-07-19 09:39:38 +00:00
parent 1411f7eb1a
commit 67a9999283
17 changed files with 118 additions and 19 deletions

View File

@@ -261,9 +261,11 @@ LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY,
toolBar->Realize();
toolBar->EnableTool(ID_STOP, false); // must be after Realize() !
#if wxUSE_STATUSBAR
// status bar
CreateStatusBar(2);
SetStatusText(_("Welcome to Life!"));
#endif // wxUSE_STATUSBAR
// game and timer
m_life = new Life();
@@ -884,10 +886,12 @@ void LifeCanvas::OnMouse(wxMouseEvent& event)
wxInt32 i = XToCell( event.GetX() );
wxInt32 j = YToCell( event.GetY() );
#if wxUSE_STATUSBAR
// set statusbar text
wxString msg;
msg.Printf(_("Cell: (%d, %d)"), i, j);
((LifeFrame *) wxGetApp().GetTopWindow())->SetStatusText(msg, 1);
#endif // wxUSE_STATUSBAR
// NOTE that wxMouseEvent::LeftDown() and wxMouseEvent::LeftIsDown()
// have different semantics. The first one is used to signal that the