wxPython – Change Background Colour of Radio Button
In this article we are going to learn about how can we change backgroun colour of a Radio Button. We will use SetBackgroundColour() function sets the background colour of the window.
Notice that as with SetForegroundColour, setting the background colour of a native control may not affect the entire control and could be not supported at all depending on the control and platform.
Syntax: wx.StaticText.SetBackgroundColour(self, colour)
Parameter Input Type Description colour wx.Colour Colour for background of static text.
Return type bool
Returns True if the colour was really changed, False if it was already set to this colour and nothing was done.
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