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