VOOZH about

URL: https://www.geeksforgeeks.org/python/wxpython-getchildrencount-method-in-wx-treectrl/

⇱ wxPython - GetChildrenCount() method in wx.TreeCtrl - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

wxPython - GetChildrenCount() method in wx.TreeCtrl

Last Updated : 10 Mar, 2023

In this article, we are going to learn about GetChildrenCount method associated with wx.TreeCtrl class of wxPython. Returns the number of items in the branch. GetChildrenCount() 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).

Syntax: wx.TreeCtrl.GetChildrenCount()

Parameters:

ParametersTypeDescription
itemwx.TreeItemIditem that we want to ensure to be visible.
recursivelybooleanfetch children recursively or not.

Example 1: 

Output:

2

👁 Image

Example 2:

Output:

6

👁 Image

Comment