From 5196fff16b54bc3cc2219736b8bf81484d257221 Mon Sep 17 00:00:00 2001 From: cbeytas Date: Wed, 21 Nov 2018 14:32:23 -0500 Subject: [PATCH] Add DeleteItemWindow method to HyperTreeList Missing method. It's best to discourage calling methods directly on TreeListItem objects since often the tree won't be updated properly. --- wx/lib/agw/hypertreelist.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py index ea0d72b9..c6926e8a 100644 --- a/wx/lib/agw/hypertreelist.py +++ b/wx/lib/agw/hypertreelist.py @@ -2259,6 +2259,15 @@ class TreeListMainWindow(CustomTreeCtrl): item.SetWindowEnabled(enable, column) + def DeleteItemWindow(self, item, column=None): + """ + Deletes the window in the column associated to an item (if any). + + :param `item`: an instance of :class:`GenericTreeItem`. + :param `column`: if not ``None``, an integer specifying the column index. + If it is ``None``, the main column index is used. + """ + item.DeleteWindow(column=column) # ---------------------------------------------------------------------------- # navigation @@ -4139,8 +4148,8 @@ _methods = ["GetIndent", "SetIndent", "GetSpacing", "SetSpacing", "GetImageList" "UnCheckRadioParent", "CheckItem", "CheckItem2", "AutoToggleChild", "AutoCheckChild", "AutoCheckParent", "CheckChilds", "CheckSameLevel", "GetItemWindowEnabled", "SetItemWindowEnabled", "GetItemType", "IsDescendantOf", "SetItemHyperText", "IsItemHyperText", "SetItemBold", "SetItemDropHighlight", "SetItemItalic", - "GetEditControl", "ShouldInheritColours", "GetItemWindow", "SetItemWindow", "SetItemTextColour", "HideItem", - "DeleteAllItems", "ItemHasChildren", "ToggleItemSelection", "SetItemType", "GetCurrentItem", + "GetEditControl", "ShouldInheritColours", "GetItemWindow", "SetItemWindow", "DeleteItemWindow", "SetItemTextColour", + "HideItem", "DeleteAllItems", "ItemHasChildren", "ToggleItemSelection", "SetItemType", "GetCurrentItem", "SetItem3State", "SetItem3StateValue", "GetItem3StateValue", "IsItem3State", "GetPrev", "GetNextShown", "GetPrevShown"]