wxPython - Create Radio Box with Items in different orientation Last Updated : 03 Aug, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 parameter refers to the maximum number of rows.wx.RA_SPECIFY_COLS: The major dimension parameter refers to the maximum number of columns. Syntax: wx.RadioBox.RadioBox(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, choices=[], majorDimension=0, style=RA_SPECIFY_ROWS, class="noIdeBtnDiv", validator=DefaultValidator, name=RadioBoxNameStr) To set direction vertical we will use wx.RA_SPECIFY_ROWSTo set number of items per row we will use majorDimension parameter.To set direction horizontal we will use wx.RA_SPECIFY_COLSTo set number of items per columns we will use majorDimension parameter. Code Example: Python3 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 hlist = ['Item One', 'Item Two'] vlist =['Item One', 'Item Two'] # create radio box with items in horizontal orientation self.rbox = wx.RadioBox(pnl, label ='RadioBox', pos =(10, 10), choices = hlist, majorDimension = 0, style = wx.RA_SPECIFY_ROWS) # create radio box with items in vertical orientation self.rbox = wx.RadioBox(pnl, label ='RadioBox', pos =(240, 10), choices = vlist, majorDimension = 0, style = wx.RA_SPECIFY_COLS) # 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 Items in different orientation R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-RadioBox Practice Tags : python Similar Reads wxPython - Create Radio Box with two step creation 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.RadioBo 2 min read 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 - Change font for text present in Radio Box In this article we are going to learn how can we change the font of textpresent inside the Radio box. In order to do this we will follow 3 steps: Step 1: Create a wx.Font object variable named f. Step 2: Create a Radio box. Step 3: Set f as font for Radio box using SetFont() method. Syntax: wx.Radio 2 min read wxPython - Hide Radio Box from the frame In this article we are going to learn how can we hide the whole Radio Box widget present inside a frame. In order to do that we will be using Hide() function. Hide() function requires no parameters. Hide() function only hides the Radio Box widget while not remove from the window. Also, the value of 2 min read wxPython - Disable Radio Box present in frame In this article we are going to learn that how can we disable a Radio Box present in the frame. In order to do that we will use Disable() method which makes the whole Radio Box disabled and unclickable. Disable() method returns True if the window has been disabled, False if it had been already disab 2 min read Like