]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
documented return value of Find[Absolute]ValidPath() correctly
[wxWidgets.git] / samples / controls / controls.cpp
index 886edf79dc157b1a1943ca55ee32289b5e326419..3d8ae9494b217547285b83486ebda09ad7ddba2d 100644 (file)
@@ -183,6 +183,7 @@ public:
     MyPanel *GetPanel() const { return m_panel; }
 
 private:
+#if wxUSE_STATUSBAR
     void UpdateStatusBar(const wxPoint& pos, const wxSize& size)
     {
         if ( m_frameStatusBar )
@@ -198,6 +199,7 @@ private:
             SetStatusText(msg, 1);
         }
     }
+#endif // wxUSE_STATUSBAR
 
     MyPanel *m_panel;
 
@@ -956,14 +958,15 @@ void MyPanel::OnChangeColour(wxCommandEvent& WXUNUSED(event))
 {
     static wxColour s_colOld;
 
+    SetThemeEnabled(false);
     // test panel colour changing and propagation to the subcontrols
     if ( s_colOld.Ok() )
     {
         SetBackgroundColour(s_colOld);
         s_colOld = wxNullColour;
 
-        m_lbSelectThis->SetForegroundColour(wxT("red"));
-        m_lbSelectThis->SetBackgroundColour(wxT("white"));
+        m_lbSelectThis->SetForegroundColour(wxNullColour);
+        m_lbSelectThis->SetBackgroundColour(wxNullColour);
     }
     else
     {
@@ -1559,7 +1562,9 @@ MyFrame::MyFrame(const wxChar *title, int x, int y)
 
     SetMenuBar(menu_bar);
 
+#if wxUSE_STATUSBAR
     CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
 
     m_panel = new MyPanel( this, 10, 10, 300, 100 );
 
@@ -1628,14 +1633,18 @@ void MyFrame::OnEnableAll(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnMove( wxMoveEvent& event )
 {
+#if wxUSE_STATUSBAR
     UpdateStatusBar(event.GetPosition(), GetSize());
+#endif // wxUSE_STATUSBAR
 
     event.Skip();
 }
 
 void MyFrame::OnSize( wxSizeEvent& event )
 {
+#if wxUSE_STATUSBAR
     UpdateStatusBar(GetPosition(), event.GetSize());
+#endif // wxUSE_STATUSBAR
 
     event.Skip();
 }
@@ -1662,7 +1671,9 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
 #endif
                   );
 
+#if wxUSE_STATUSBAR
         SetStatusText(msg);
+#endif // wxUSE_STATUSBAR
     }
 }