wxPython - Create Radio Box with two step creation Last Updated : 29 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn to create a radio box in a frame. A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons. In order to create radio box we will use Create() function in wx.RadioBox class of wxPython. Create() function takes different attributes of radio box as parameter. Syntax: wx.RadioBox.Create( parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, choices=[], majorDimension=0, style=RA_SPECIFY_COLS, validator=DefaultValidator, name=RadioBoxNameStr ) Parameters: Parameter Input Type Description parent wx.Window Parent window. Should not be None. id wx.WindowID Control identifier. A value of -1 denotes a default value. label string Text Label. pos wx.Point Window position. size wx.Window Window size. choices list of strings Window style. majorDimension int Specifies the maximum number of rows (if style contains RA_SPECIFY_ROWS ) or columns (if style contains RA_SPECIFY_COLS ) for a two-dimensional radiobox. The default value of 0 means to use the number of items, i.e. number of elements in choices. style long An array of choices with which to initialize the radiobox. validator wx.Validator Window validator. name string Window name. Code Example: Python3 1== import wx class FrameUI(wx.Frame): def __init__(self, parent, title): super(FrameUI, self).__init__(parent, title = title, size =(300, 200)) # function for in-frame components self.InitUI() def InitUI(self): # parent panel for radio box pnl = wx.Panel(self) # list of choices lblList = ['Value X', 'Value Y', 'Value Z'] # create radio box self.rbox = wx.RadioBox() # create with two step creation using Create() function self.rbox.Create(pnl, label ='RadioBox', pos =(80, 10), choices = lblList, majorDimension = 1, style = wx.RA_SPECIFY_ROWS) # set frame in centre self.Centre() # set size of frame self.SetSize((400, 250)) # show output frame self.Show(True) # wx App instance ex = wx.App() # Example instance FrameUI(None, 'RadioButton and RadioBox') ex.MainLoop() Output Window: Comment More infoAdvertise with us Next Article wxPython - Create Radio Box with two step creation R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - Create Radio Button using Create() function Create() function is used for the two-step construction of Radio Button in wxPython. Create() function takes different attributes of radio button as an argument Syntax:  wx.RadioButton.Create(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, nam 1 min read wxPython - Create Radio Box with Items in different orientation In this article, we are going to learn how can we create a Radio Box with items in horizontal and vertical direction orientations. In order to do that we are going to use the styles parameter while creating Radio Box. There are two styles in Radio Box. wx.RA_SPECIFY_ROWS: The major dimension paramet 2 min read wxPython - Create Static Box using Create() method In this article we are going to learn about Static Box in wxPython. A static box is a rectangle drawn around other windows to denote a logical grouping of items. In this article we will create Static Box using two step creation, in order to do that we will use Create() method. Syntax: wx.StaticBox.C 2 min read Create RadioButton in frame using wxPython In this article we are going to learn about Radio Button in wxPython. A radio button item is a button which usually denotes one of several mutually exclusive options. It has a text label next to a (usually) round button. You can create a group of mutually-exclusive radio buttons by specifying RB_GRO 2 min read wxPython - Create RadioBox in frame In this article we are going to learn to create a radio box in a frame. A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labeled buttons. In order to create radio box we will use RadioBox() constructor in wx.Rad 2 min read Like