![]() |
VOOZH | about |
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:
Syntax: wx.TreeCtrl.GetFirstVisibleItem(self)
Parameters:
No parameters are required by GetFirstVisibleItem() method.
Returns:
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.
Example 1:
Output:
Is Valid Item
Example 2:
Output:
Invalid Tree Item