]> git.saurik.com Git - wxWidgets.git/commitdiff
added image to root item of tree in aui sample
authorBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 09:31:42 +0000 (09:31 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 09:31:42 +0000 (09:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/aui/auidemo.cpp

index 00986a204b5c98c29139bb80481946c706db6eef..5f4f7c3ca0dddc658864ed7204e31c0bffbe0a35 100644 (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);
     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);
 
     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));
     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));