]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treectrl/treetest.cpp
include "wx/toolbar.h" instead of tbar(base|smpl).h
[wxWidgets.git] / samples / treectrl / treetest.cpp
index 494b2e249f9fef63f27409560a15f6a2880ca332..351c59f045840d93e1c0141dbe0289de52d5ea57 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     04/01/98
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
@@ -696,7 +696,7 @@ void MyTreeCtrl::CreateButtonsImageList(int size)
         }
         else
         {
-            images->Add(wxBitmap(icons[i].ConvertToImage().Rescale(size, size)));
+            images->Add(wxBitmap(wxBitmap(icons[i]).ConvertToImage().Rescale(size, size)));
         }
     }
 
@@ -836,6 +836,7 @@ void MyTreeCtrl::DoToggleIcon(const wxTreeItemId& item)
 void MyTreeCtrl::name(wxTreeEvent& event)                        \
 {                                                                \
     wxLogMessage(wxT(#name));                                    \
+    SetLastItem(wxTreeItemId());                                 \
     event.Skip();                                                \
 }
 
@@ -854,7 +855,7 @@ TREE_EVENT_HANDLER(OnSelChanging)
 void LogKeyEvent(const wxChar *name, const wxKeyEvent& event)
 {
     wxString key;
-    long keycode = event.KeyCode();
+    long keycode = event.GetKeyCode();
     {
         switch ( keycode )
         {
@@ -1016,7 +1017,7 @@ void MyTreeCtrl::OnEndDrag(wxTreeEvent& event)
     if ( itemDst.IsOk() && !ItemHasChildren(itemDst) )
     {
         // copy to the parent then
-        itemDst = GetParent(itemDst);
+        itemDst = GetItemParent(itemDst);
     }
 
     if ( !itemDst.IsOk() )