In this article we are going to learn about SetBackgroundColour() function associated with wx.StaticText class of wxPython. SetBackgroundColour() function is simply used to set background of a static text to a different colour.
It takes wx.Colour argument to set the background colour.
Syntax: wx.StaticText.SetBackgroundColour(self, colour)
Parameters:
| Parameter |
Input Type |
Description |
| colour |
wx.Colour |
Colour for background of static text. |
Code Example:
Output Window:
👁 Image