added image to root item of tree in aui sample

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams 2006-11-07 09:31:42 +00:00
parent 623a195ec2
commit 9c1d6ef42e

View File

@ -1384,16 +1384,17 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl()
wxTreeCtrl* tree = new wxTreeCtrl(this, wxID_ANY,
wxPoint(0,0), wxSize(160,250),
wxTR_DEFAULT_STYLE | wxNO_BORDER);
wxTreeItemId root = tree->AddRoot(wxT("wxAUI Project"));
wxArrayTreeItemIds items;
wxImageList* imglist = new wxImageList(16, 16, true, 2);
imglist->Add(wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(16,16)));
imglist->Add(wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)));
tree->AssignImageList(imglist);
wxTreeItemId root = tree->AddRoot(wxT("wxAUI Project"), 0);
wxArrayTreeItemIds items;
items.Add(tree->AppendItem(root, wxT("Item 1"), 0));
items.Add(tree->AppendItem(root, wxT("Item 2"), 0));
items.Add(tree->AppendItem(root, wxT("Item 3"), 0));