+
+// ----------------------------------------------------------------------------
+// main frame - event handlers
+// ----------------------------------------------------------------------------
+
+void MyFrame::OnUpdateSetStatusTexts(wxUpdateUIEvent& event)
+{
+ // only allow the settings of the text of status fields for the default
+ // status bar
+ wxStatusBar *sb = GetStatusBar();
+ event.Enable(sb == m_statbarDefault);
+}
+
+void MyFrame::OnSetStatusTexts(wxCommandEvent& WXUNUSED(event))
+{
+ wxStatusBar *sb = GetStatusBar();
+
+ wxString txt;
+ for (int i=0; i<sb->GetFieldsCount(); i++)
+ {
+ txt =
+ wxGetTextFromUser(wxString::Format("Enter the text for the %d-th field:", i+1),
+ "Input field text", "A dummy test string", this);
+
+ sb->SetStatusText(txt, i);
+ }
+}
+