wxPython – GetFirstVisibleItem() method in wx.TreeCtrl
In this article we are going to discuss GetFirstVisibleItem() function associated with wx.TreeCtrl class of wxPython. Lets look at how and what is it used for:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
No parameters are required by GetFirstVisibleItemId() method.
wx.TreeItemId object that is the first visible item of the tree
Its implementation is given below:
The following examples print if the first visible item is valid or invalid. We will perform this using the IsOk() method associated with wx.TreeItemId object IsOk() method which returns true if tree item is a valid item.
Is Valid Item
Invalid Tree Item