+ MyAboutDialog dlg(this);
+ dlg.ShowModal();
+}
+
+// ----------------------------------------------------------------------------
+// MyAboutDialog
+// ----------------------------------------------------------------------------
+
+MyAboutDialog::MyAboutDialog(wxWindow *parent)
+ : wxDialog(parent, -1, wxString(_T("About statbar")),
+ wxDefaultPosition, wxDefaultSize,
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+{
+ wxStaticText *text = new wxStaticText(this, -1,
+ _T("wxStatusBar sample\n")
+ _T("(c) 2000 Vadim Zeitlin"));
+
+ wxButton *btn = new wxButton(this, wxID_OK, _T("&Close"));
+
+ // create the top status bar without the size grip (default style),
+ // otherwise it looks weird
+ wxStatusBar *statbarTop = new wxStatusBar(this, -1, 0);
+ statbarTop->SetFieldsCount(3);
+ statbarTop->SetStatusText(_T("This is a top status bar"), 0);
+ statbarTop->SetStatusText(_T("in a dialog"), 1);
+ statbarTop->SetStatusText(_T("Great, isn't it?"), 2);
+
+ wxStatusBar *statbarBottom = new wxStatusBar(this, -1);
+ statbarBottom->SetFieldsCount(2);
+ statbarBottom->SetStatusText(_T("This is a bottom status bar"), 0);
+ statbarBottom->SetStatusText(_T("in a dialog"), 1);
+
+ wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
+ sizerTop->Add(statbarTop, 0, wxGROW);
+ sizerTop->Add(-1, 10, 1, wxGROW);
+ sizerTop->Add(text, 0, wxCENTRE | wxRIGHT | wxLEFT, 20);
+ sizerTop->Add(-1, 10, 1, wxGROW);
+ sizerTop->Add(btn, 0, wxCENTRE | wxRIGHT | wxLEFT, 20);
+ sizerTop->Add(-1, 10, 1, wxGROW);
+ sizerTop->Add(statbarBottom, 0, wxGROW);
+
+ SetAutoLayout(TRUE);
+ SetSizer(sizerTop);
+
+ sizerTop->Fit(this);
+ sizerTop->SetSizeHints(this);