+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);
+ }
+}
+
+void MyFrame::OnSetStatusFont(wxCommandEvent& WXUNUSED(event))
+{
+ wxStatusBar *sb = GetStatusBar();
+
+ wxFont fnt = wxGetFontFromUser(this, sb->GetFont(), "Choose statusbar font");
+ if (fnt.IsOk())
+ {
+ sb->SetFont(fnt);
+ sb->SetSize(sb->GetBestSize());
+ }
+}
+