]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectrl.cpp
added HasEntry/Group function to wxConfig, corrected entry/group deletion
[wxWidgets.git] / src / generic / treectrl.cpp
index ab83d2f8737bdaeb0f6d13f1d010785bd05ad777..bbb5b9ade53b5b307283f267ba9fcfe918109a61 100644 (file)
@@ -627,6 +627,14 @@ bool wxTreeCtrl::ExpandItem( long item, int action )
   return TRUE;
 };
 
+void wxTreeCtrl::DeleteItem( long item )
+{
+  wxGenericTreeItem *pItem = FindItem( item );
+  wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteItem: no such pItem." );
+  pItem->m_parent->m_children.DeleteObject(pItem);
+  Refresh();
+}
+
 bool wxTreeCtrl::DeleteAllItems()
 {
   delete m_anchor;