Document that wxTreeCtrl::DeleteChildren() does send events

Contrary to what the documentation stated previously, this function does
generate the wxEVT_TREE_DELETE_ITEM events for all the items being
deleted, in both MSW and generic implementations.

Update the documentation and add a new unit test checking that the
behaviour really conforms to it.
This commit is contained in:
Vadim Zeitlin
2018-08-14 17:24:08 +02:00
parent de1322a02d
commit d9d05bc221
2 changed files with 16 additions and 2 deletions

View File

@@ -317,8 +317,10 @@ public:
virtual void DeleteAllItems();
/**
Deletes all children of the given item (but not the item itself). Note
that this will @b not generate any events unlike Delete() method.
Deletes all children of the given item (but not the item itself).
A @c wxEVT_TREE_DELETE_ITEM event will be generated for every item
being deleted.
If you have called SetItemHasChildren(), you may need to call it again
since DeleteChildren() does not automatically clear the setting.