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 chaneg the size of the window of Radio Button in pixels.
Syntax: wx.RadioButton.SetSize(Self, size)
Parameters:
Parameter Input Type Description size wx.Size Size for radio button
Code Example:
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): 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((255, 100, 255, 255)) # change size to (300, 50) self.rb1.SetSize((300, 50)) def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() |
chevron_right
filter_none
Output Window:

Recommended Posts:
- wxPython - Change Font colour of Radio Button
- wxPython - Change font of Radio Button
- wxPython - Change Background Colour of Radio Button
- wxPython - Get size of Radio Button Window
- PyQt5 - How change size of indicator in Radio Button
- PyQt5 - Change the size of Radio button according to content length
- PyQt5 - Change the size of radio button
- wxPython - change size of Button
- wxPython - Create Radio Button using Create() function
- wxPython - Set Tooltip for radio button
- wxPython - Disable Radio button
- wxPython - Hide Radio Button
- wxPython - Show hidden Radio Button
- wxPython - Change font for text present in Radio Box
- PyQt5 – Change text in Radio Button on click
- PyQt5 - Change state of Radio Button
- PyQt5 - Change color of Radio button for unchecked state
- PyQt5 – Change color of Radio button for checked state
- PyQt5 – How to change indicator border in Radio Button
- PyQt5 - How to change the spacing between indicator and text part of Radio Button ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

