Moved initialization of status bar to eliminate assert caused by new
controls trying to set s-bar text git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user