X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c82c42d498ac1e35a395c9ecba681921c4817a7c..ed177375b27f8b80231a42638314c9809e6e945d:/contrib/samples/fl/fl_demo2.cpp diff --git a/contrib/samples/fl/fl_demo2.cpp b/contrib/samples/fl/fl_demo2.cpp index 9507011ed3..3941e3581b 100644 --- a/contrib/samples/fl/fl_demo2.cpp +++ b/contrib/samples/fl/fl_demo2.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "fl_demo2.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -96,7 +92,9 @@ bool MyApp::OnInit(void) menu_bar->Append(file_menu, _("&File")); menu_bar->Append(active_menu, _("Active &Layout")); +#if wxUSE_STATUSBAR frame->CreateStatusBar(3); +#endif // wxUSE_STATUSBAR frame->SetMenuBar(menu_bar); @@ -489,17 +487,17 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl( const wxString& label ) { wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, wxID_ANY ); - const wxTreeItemId rootid = pTree->AppendItem( (long)0, label, 0); + const wxTreeItemId rootid = pTree->AddRoot(label); - if ( label[0] != 'X' ) + if ( label.StartsWith(_T("X")) ) { - pTree->AppendItem(rootid, _("Leaf1"), 0); - pTree->AppendItem(rootid, _("Leaf2"), 0); + pTree->AppendItem(rootid, _("Scully")); + pTree->AppendItem(rootid, _("Mulder")); } else { - pTree->AppendItem(rootid, _("Scully"), 0); - pTree->AppendItem(rootid, _("Mulder"), 0); + pTree->AppendItem(rootid, _("Leaf1")); + pTree->AppendItem(rootid, _("Leaf2")); } return pTree; @@ -620,7 +618,7 @@ wxWindow* MyFrame::CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent ) { bool isNested = (pParent != mpInternalFrm); - // check if we're craeting nested layout + // check if we're creating nested layout if ( isNested ) { layout.mBorderPen.SetColour( 128,255,128 );