]> git.saurik.com Git - wxWidgets.git/commitdiff
Minor sample corrections
authorRobert Roebling <robert@roebling.de>
Tue, 16 Oct 2007 21:48:01 +0000 (21:48 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 16 Oct 2007 21:48:01 +0000 (21:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dataview/dataview.cpp

index aaf5a1152fadb7165462ac5df5b63c07a3e6953e..6821828e90506e36e2d2703c816770fdd0df07bd 100644 (file)
@@ -742,22 +742,21 @@ static char *small1_xpm[] = {
 
 void MyFrame::OnTestTreeCtrl(wxCommandEvent& WXUNUSED(event) )
 {
-    wxDialog dialog( this, -1, "Test wxDataViewTreeStore" );
+    wxDialog dialog( this, -1, "Test wxDataViewTreeStore", wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER );
     
     wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
     
     wxDataViewCtrl *treectrl = new wxDataViewCtrl( &dialog, -1, 
         wxDefaultPosition, wxSize(300,200), wxDV_NO_HEADER );
-    treectrl->AppendIconTextColumn( "no label", 0 );
+    treectrl->AppendIconTextColumn( "no label", 0, wxDATAVIEW_CELL_INERT, 200 );
         
-    main_sizer->Add( treectrl );
+    main_sizer->Add( treectrl, 1, wxGROW );
     
     wxDataViewTreeStore *store = new wxDataViewTreeStore;
     wxDataViewItem parent = store->AppendContainer( wxDataViewItem(0), "Root 1", wxIcon(small1_xpm) );
-    wxDataViewItem child = store->AppendContainer( parent, "Child 1", wxIcon(small1_xpm) );
-    child = store->AppendContainer( parent, "Child 1", wxIcon(small1_xpm) );
-    child = store->AppendContainer( parent, "Child 2", wxIcon(small1_xpm) );
-    child = store->AppendContainer( parent, "Child 3", wxIcon(small1_xpm) );
+    wxDataViewItem child = store->AppendItem( parent, "Child 1", wxIcon(small1_xpm) );
+    child = store->AppendItem( parent, "Child 2", wxIcon(small1_xpm) );
+    child = store->AppendItem( parent, "Child 3", wxIcon(small1_xpm) );
     
     treectrl->AssociateModel( store );