Ray Gilbert (ra...@sc...) wants to give feedback for component: treelistctrl
If you treelistctrl->Delete(rootItem), it should be equivalent to DeleteAllItems(), but Delete(item) does not cleanup m_anchor, if item is root
From: Otto W. <ott...@or...> - 2004-08-09 15:51:12
> Ray Gilbert (ra...@sc...) wants to give feedback for component: treelistctrl
>
> If you treelistctrl->Delete(rootItem), it should be equivalent to DeleteAllItems(), but Delete(item) does not cleanup m_anchor, if item is root
>
Since the root item is added by a "AddRoot" and not by "AppendItem" IMO
it shouldn't be possible to delete the root item with "Delete". IMO it's
better to return an assert message. Also a treelist without a root item
doesn't make sense and might lead to lots of special cases.
It seems wxTreeCtrl allows to delete the root item which is IMO wrong. Opinions?
It would make sense to rename "AppendItem" to "Append" or "Delete" to
"DeleteItem" but I'll only change that if wxTreeCtrl is changed accordingly.
O. Wyss
--
See a huge pile of work at "http://wyodesktop.sourceforge.net/"