In this article we will learn that, how can we destroy a button widget from a window using Destroy() function in wx.Button class of wxPython. Destroy() function is used to simply destroy a window or widget safely.
Destroy() returns True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion.
Parameters: Destroy() function takes no arguments.
Return Type: bool
Returns: True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion.
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