X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94f52d90c97b067b4626cc4cd6ac46a71fa54484..d5f005cc9385455ceebdf2063aa7f421f70315d1:/samples/ownerdrw/ownerdrw.cpp diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp index 27815e5424..a7f130b1f3 100644 --- a/samples/ownerdrw/ownerdrw.cpp +++ b/samples/ownerdrw/ownerdrw.cpp @@ -175,6 +175,12 @@ OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int // create the menu InitMenu(); + // create the status line + const int widths[] = { -1, 60 }; + CreateStatusBar(2); + SetStatusWidths(2, widths); + SetStatusText("no selection", 0); + // make a panel with some controls wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); @@ -243,12 +249,6 @@ OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int delete[] astrChoices; - // create the status line - const int widths[] = { -1, 60 }; - CreateStatusBar(2); - SetStatusWidths(2, widths); - SetStatusText("no selection", 0); - Show(TRUE); } @@ -263,7 +263,8 @@ void OwnerDrawnFrame::OnQuit(wxCommandEvent& event) void OwnerDrawnFrame::OnAbout(wxCommandEvent& event) { - wxMessageDialog dialog(this, "Demo of owner-drawn controls\n" + wxMessageDialog dialog(this, + "Demo of owner-drawn controls\n", "About wxOwnerDrawn", wxYES_NO | wxCANCEL); dialog.ShowModal(); } @@ -292,4 +293,4 @@ void OwnerDrawnFrame::OnCheckboxToggle(wxCommandEvent& event) strSelection.sprintf("item %d was %schecked", nItem, m_pListBox->IsChecked(nItem) ? "" : "un"); SetStatusText(strSelection); -} \ No newline at end of file +}