+void MyFrame::OnUpdateResetFieldsWidth(wxUpdateUIEvent& event)
+{
+ // only allow the settings of the number of status fields for the default
+ // status bar
+ wxStatusBar *sb = GetStatusBar();
+ event.Enable(sb == m_statbarDefault);
+}
+
+void MyFrame::OnResetFieldsWidth(wxCommandEvent& WXUNUSED(event))
+{
+ wxStatusBar *pStat = GetStatusBar();
+ if (pStat)
+ {
+ int n = pStat->GetFieldsCount();
+ pStat->SetStatusWidths(n, NULL);
+ for (int i=0; i<n; i++)
+ pStat->SetStatusText("same size", i);
+ }
+}
+