Merge branch 'treectrl-delete-events'

See https://github.com/wxWidgets/wxWidgets/pull/881
This commit is contained in:
Vadim Zeitlin
2018-08-18 15:07:37 +02:00
2 changed files with 32 additions and 7 deletions

View File

@@ -310,15 +310,19 @@ public:
virtual void Delete(const wxTreeItemId& item);
/**
Deletes all items in the control. Note that this may not generate
@c EVT_TREE_DELETE_ITEM events under some Windows versions although
normally such event is generated for each removed item.
Deletes all items in the control.
This function generates @c wxEVT_TREE_DELETE_ITEM events for each item
being deleted, including the root one if it is shown, i.e. unless
wxTR_HIDE_ROOT style is used.
*/
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.