Fix for Bug 1097510, reset m_selectionOld when the value changes
[wxWidgets.git] / samples / htlbox / htlbox.cpp
index aa0f22e7f674951937dc387728c5eef63780ed92..322483f6886365a5b25009646655f1c4cfdce381 100644 (file)
@@ -280,7 +280,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxMessageBox(_T("This sample shows wxHtmlListBox class.\n")
                  _T("\n")
-                 _T("© 2003 Vadim Zeitlin"),
+                 _T("(c) 2003 Vadim Zeitlin"),
                  _T("About HtmlLbox"),
                  wxOK | wxICON_INFORMATION,
                  this);
@@ -335,7 +335,9 @@ void MyFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
         m_hlbox->SetBackgroundColour(col);
         m_hlbox->Refresh();
 
+#if wxUSE_STATUSBAR
         SetStatusText(_T("Background colour changed."));
+#endif // wxUSE_STATUSBAR
     }
 }
 
@@ -347,7 +349,9 @@ void MyFrame::OnSetSelBgCol(wxCommandEvent& WXUNUSED(event))
         m_hlbox->SetSelectionBackground(col);
         m_hlbox->Refresh();
 
+#if wxUSE_STATUSBAR
         SetStatusText(_T("Selection background colour changed."));
+#endif // wxUSE_STATUSBAR
     }
 }
 
@@ -387,10 +391,12 @@ void MyFrame::OnLboxSelect(wxCommandEvent& event)
             wxLogMessage(_T("Selected items: %s"), s.c_str());
     }
 
+#if wxUSE_STATUSBAR
     SetStatusText(wxString::Format(
                     _T("# items selected = %lu"),
                     (unsigned long)m_hlbox->GetSelectedCount()
                   ));
+#endif // wxUSE_STATUSBAR
 }
 
 // ============================================================================