From: Robert Roebling Date: Thu, 23 Feb 2006 02:11:57 +0000 (+0000) Subject: Update sample. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0313c114f5f25118383bf5c6edf59f6e48be9dc3 Update sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 06059c6ffe..6fb7bb6c0d 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -47,7 +47,7 @@ public: tmp.Printf( wxT("item(%d;%d)"), (int)row, (int)col ); return tmp; } -} +}; // ------------------------------------- // MyApp @@ -127,12 +127,14 @@ MyFrame::MyFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h): dataview = new wxDataViewCtrl( this, -1 ); - dataview->AppendStringColumn( wxT("first") ); - dataview->AppendStringColumn( wxT("second") ); - dataview->AppendStringColumn( wxT("third") ); MyTextModel *model = new MyTextModel; - dataview->AssociateModel( Model ); + dataview->AssociateModel( model ); + + dataview->AppendStringColumn( wxT("first"), 0 ); + dataview->AppendStringColumn( wxT("second"), 1 ); + dataview->AppendStringColumn( wxT("third"), 2 ); + } void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )