wxPython – GetChildrenCount() method in wx.TreeCtrl
In this article, we are going to learn about GetChildren method associated with wx.TreeCtrl class of wxPython. Returns the number of items in the branch. GetChildren() method takes two parameters first is item and another is recursively.
recursively is a boolean parameter, and If recursively is True, returns the total number of descendants, otherwise, only one level of children is counted. GetChildrenCount() returns int (total number of children associated with TreeCtrl item).
Parameters Type Description item wx.TreeItemId item that we want to ensure to be visible. recursively boolean fetch children recursively or not.