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:
@@ -1385,15 +1385,16 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl()
|
|||||||
wxPoint(0,0), wxSize(160,250),
|
wxPoint(0,0), wxSize(160,250),
|
||||||
wxTR_DEFAULT_STYLE | wxNO_BORDER);
|
wxTR_DEFAULT_STYLE | wxNO_BORDER);
|
||||||
|
|
||||||
wxTreeItemId root = tree->AddRoot(wxT("wxAUI Project"));
|
|
||||||
wxArrayTreeItemIds items;
|
|
||||||
|
|
||||||
|
|
||||||
wxImageList* imglist = new wxImageList(16, 16, true, 2);
|
wxImageList* imglist = new wxImageList(16, 16, true, 2);
|
||||||
imglist->Add(wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(16,16)));
|
imglist->Add(wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(16,16)));
|
||||||
imglist->Add(wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)));
|
imglist->Add(wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)));
|
||||||
tree->AssignImageList(imglist);
|
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 1"), 0));
|
||||||
items.Add(tree->AppendItem(root, wxT("Item 2"), 0));
|
items.Add(tree->AppendItem(root, wxT("Item 2"), 0));
|
||||||
items.Add(tree->AppendItem(root, wxT("Item 3"), 0));
|
items.Add(tree->AppendItem(root, wxT("Item 3"), 0));
|
||||||
|
Reference in New Issue
Block a user