diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 8a191f9348..c50fa4aa10 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -726,8 +726,11 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int // wxDataViewTreeCtrl wxDataViewTreeCtrl *treectrl2 = new wxDataViewTreeCtrl( this, -1, wxDefaultPosition, wxSize(300,200) ); + wxImageList *ilist = new wxImageList; ilist->Add( wxIcon(small1_xpm) ); + treectrl2->SetImageList( ilist ); + parent = treectrl2->AppendContainer( wxDataViewItem(0), "Root 1", 0 ); child = treectrl2->AppendItem( parent, "Child 1", 0 ); child = treectrl2->AppendItem( parent, "Child 2", 0 );