wxPython - Change Font colour of Radio Button Last Updated : 03 Aug, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn that how can we change the foreground or font color of the radio button. In order to change the foreground colour of Radio Button we will use SetForegroundColour() function. SetForegroundColour() function sets the foreground colour of the window. The meaning of foreground colour varies according to the window class; it may be the text colour or other colour, or it may not be used at all. Additionally, not all native controls support changing their foreground colour so this method may change their colour only partially or even not at all. Syntax: wx.RadioButton.SetForegroundColour(self, colour) Parameters: Parameter Input Type Description colour wx.Colour colour for the background. Return: True if the colour was really changed, False if it was already set to this colour and nothing was done. Return Type: bool Code Example: Python3 1== import wx APP_EXIT = 1 class Example(wx.Frame): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): # create parent panel in the frame self.pnl = wx.Panel(self) # create radio button at position (30, 10) self.rb1 = wx.RadioButton(self.pnl, label ='Btn1', pos =(30, 10), size =(100, 20)) # change background colour self.rb1.SetBackgroundColour((233, 227, 100, 255)) # change foreground colour self.rb1.SetForegroundColour((0, 0, 255, 255)) def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output Window: Comment More infoAdvertise with us Next Article wxPython - Change font colour of RadioBox R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - Change font of Radio Button In this article we are going to learn that how can we change the font of the label text present on the radio button present in the frame. We need to follow some steps as follows: Step 1: Create a wx.Font object. Step 2: Add different attributes of font in parameters like: family, style etc. Step 3: 1 min read wxPython - Change font colour of RadioBox In this article we are going to learn how can we change the foreground colour of Radio Box present in the frame. In order to do that we are going to use SetForegroundColour() method. SetForegroundColour() function takes wx.Colour argument which will be used as foreground colour for Radio Box. Syntax 1 min read wxPython - Change Foreground Colour of Button In this article we will learn how can we change the foreground colour of the button or the font colour of the button. To do this we will use SetForegroundColour() function associated with wx.Button class of wxPython. SetForegroundColour() function simply takes wx.Colour argument for the foreground. 1 min read wxPython - Change Background Colour of Radio Button In this article we are going to learn about how can we change background 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 1 min read wxPython - Change background colour of RadioBox In this article we are going to learn how can we change the background colour of Radio Box present in the frame. In order to do that we are going to use SetBackgroundColour() method. SetBackgroundColour() function takes wx.Colour argument which will be used as background colour for Radio Box. Syntax 1 min read wxPython - Change Size of Radio Button In this article we will learn to change size of a Radio Button. We will change the size of Radio Button using SetSize() function associated with wx.RadioButton class of wxPython. SetSize() function is simply used to change the size of the window of Radio Button in pixels. Syntax: wx.RadioButton.SetS 1 min read Like