wxPython – GetBoundingRect() method in wx.TreeCtrl
In this article, we are going to learn about GetBoundingRect() method in wx.TreeCtrl. GetBoundingRect() returns the rectangle bounding the item. If textOnly is True, only the rectangle around the item’s label will be returned, otherwise, the item’s image is also taken into account. The return value may be None if the rectangle was not successfully retrieved, such as if the item is currently not visible.
GetBoundingRect() takes two arguments item and textOnly.
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
wx.TreeCtrl.GetBoundingRect(self, item, textOnly)
Parameter Type Description item wx.TreeItemId item that we want to ensure to be visible. textOnly boolean If textOnly is True, only the rectangle around the item’s label will be returned, otherwise the item’s image is also taken into account.
(0, 0 , 10, 10)