wxPython – Change Background colour of Button
In this article we are going to learn about how can we change background colour of a button present in a frame. We use SetBackgroundColour() function to set background colour of the button to some different colour.
It takes a wx.Colour class object as an argument.
Syntax: wx.Button.SetBackgroundColour(self, colour)
Parameter Input Type Description colour wx.Colour Colour for the background.
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