Python wx.RA_SPECIFY_ROWS Examples
The following are 19
code examples of wx.RA_SPECIFY_ROWS().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: wxglade_out.py From PrimarySchoolMathematics with Apache License 2.0 | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.radio_box_1 = wx.RadioBox(self, wx.ID_ANY, u"运算类型选择", choices=[u"加法", u"减法", u"乘法", u"除法"], majorDimension=1, style=wx.RA_SPECIFY_ROWS) self.radio_box_2 = wx.RadioBox(self, wx.ID_ANY, u"选择几步运算", choices=[u"一步", u"二步", u"三步"], majorDimension=1, style=wx.RA_SPECIFY_ROWS) self.radio_box_3 = wx.RadioBox(self, wx.ID_ANY, u"题型设置", choices=[u"求结果", u"求算数项"], majorDimension=1, style=wx.RA_SPECIFY_ROWS) self.button_1 = wx.Button(self, wx.ID_ANY, u"运行项及结果范围设置") self.button_2 = wx.Button(self, wx.ID_ANY, u"运算符号设置") self.checkbox_1 = wx.CheckBox(self, wx.ID_ANY, u"使用括号") self.radio_box_4 = wx.RadioBox(self, wx.ID_ANY, u"加法设置", choices=[u"随机进位", u"加法进位", u"没有进位"], majorDimension=1, style=wx.RA_SPECIFY_ROWS) self.radio_box_5 = wx.RadioBox(self, wx.ID_ANY, u"减法设置", choices=[u"随机退位", u"减法退位", u"没有退位"], majorDimension=1, style=wx.RA_SPECIFY_ROWS) self.text_ctrl_16 = wx.TextCtrl(self, wx.ID_ANY, "20", style=wx.TE_CENTRE) self.button_6 = wx.Button(self, wx.ID_ANY, u"添加口算题") self.button_7 = wx.Button(self, wx.ID_ANY, u"清空口算题") self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "") self.text_ctrl_2 = wx.TextCtrl(self, wx.ID_ANY, "5", style=wx.TE_CENTRE) self.text_ctrl_3 = wx.TextCtrl(self, wx.ID_ANY, "3", style=wx.TE_CENTRE) self.text_ctrl_4 = wx.TextCtrl(self, wx.ID_ANY, u"小学生口算题") self.text_ctrl_5 = wx.TextCtrl(self, wx.ID_ANY, u"姓名:__________ 日期:____月____日 时间:________ 对题:____道", style=wx.TE_LEFT) self.button_8 = wx.Button(self, wx.ID_ANY, u"点此生成口算题打印文档") self.__set_properties() self.__do_layout() # end wxGlade
Example #2
Source File: radio_box.py From wxGlade with MIT License | 6 votes |
def __init__(self, name, parent, index, style, label, choices, major_dim): "Class to handle wxRadioBox objects" ManagedBase.__init__(self, name, parent, index) self.static_box = None # initialise instance properties self.label = np.TextProperty("", multiline="grow") self.dimension = np.SpinProperty(major_dim) self.selection = np.SpinProperty(0, val_range=(0,len(choices)-1), immediate=True ) self.choices = ChoicesProperty( choices, [(_('Label'), np.GridProperty.STRING)] ) style = style or wx.RA_SPECIFY_ROWS styles = [wx.RA_SPECIFY_ROWS, wx.RA_SPECIFY_COLS] aliases = ["wxRA_SPECIFY_ROWS","wxRA_SPECIFY_COLS"] # labels and aliases self.style = np.RadioProperty(style, styles, aliases, aliases=aliases, columns=2) self.buttons = None # list of wx.RadioButton # widget creation / updates ########################################################################################
Example #3
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def Configure(self, step=10.0, direction=0): text=Text panel = eg.ConfigPanel(self) seekCtrl = eg.SpinNumCtrl(panel, -1, step, max=100.0, fractionWidth=1) radioBox = wx.RadioBox( panel, -1, self.text.radiobox, choices=[self.text.btnForward, self.text.btnBackward], style=wx.RA_SPECIFY_ROWS ) panel.AddLabel(self.text.label) panel.AddCtrl(seekCtrl) radioBox.SetSelection(direction) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(seekCtrl.GetValue(),radioBox.GetSelection())
Example #4
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, enabled=True): panel = eg.ConfigPanel(self) radioBox = wx.RadioBox( panel, -1, self.name, choices = self.plugin.text.enable[self.value:self.value+2], style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(enabled) radioBox.SetMinSize((197,65)) panel.sizer.Add(radioBox) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection()) #===============================================================================
Example #5
Source File: displayDialog.py From Zulu with GNU Affero General Public License v3.0 | 5 votes |
def __init__(self, output_window, *args, **kwds): # begin wxGlade: DisplayDialog.__init__ self.parent = kwds['parent'] del kwds['parent'] kwds["style"] = wx.DEFAULT_DIALOG_STYLE self.outputwin = output_window wx.Dialog.__init__(self, *args, **kwds) self.sizer_5_staticbox = wx.StaticBox(self, -1, "Color and Font") self.radio_box_crlf = wx.RadioBox(self, -1, "newline", choices=["CRLF", "CR", "LF"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.radio_box_echo = wx.RadioBox(self, -1, "echo", choices=["off", "on"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.radio_box_unprintable = wx.RadioBox(self, -1, "unprintable", choices=["off", "on"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.button_font = wx.Button(self, -1, "font") self.button_forecolor = wx.Button(self, -1, "foreColor") self.button_backcolor = wx.Button(self, -1, "backColor") self.button_cancel = wx.Button(self, wx.ID_CANCEL, "", style=wx.BU_RIGHT|wx.BU_BOTTOM) self.button_ok = wx.Button(self, wx.ID_OK, "", style=wx.BU_RIGHT|wx.BU_BOTTOM) self.backupSettings() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBOX, self.onRadioBoxCrlf, self.radio_box_crlf) self.Bind(wx.EVT_RADIOBOX, self.onRadionBoxEcho, self.radio_box_echo) self.Bind(wx.EVT_RADIOBOX, self.onRadioBoxUnprintable, self.radio_box_unprintable) self.Bind(wx.EVT_BUTTON, self.onFont, self.button_font) self.Bind(wx.EVT_BUTTON, self.onForecolor, self.button_forecolor) self.Bind(wx.EVT_BUTTON, self.onBackcolor, self.button_backcolor) self.Bind(wx.EVT_BUTTON, self.onCancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.onOk, self.button_ok) # end wxGlade
Example #6
Source File: settingsDialog.py From Zulu with GNU Affero General Public License v3.0 | 5 votes |
def __init__(self, output_window, *args, **kwds): # begin wxGlade: SerialDialog.__init__ self.serial = kwds['serial'] del kwds['serial'] kwds["style"] = wx.DEFAULT_DIALOG_STYLE self.outputwin = output_window wx.Dialog.__init__(self, *args, **kwds) self.sizer_4_staticbox = wx.StaticBox(self, -1, "port settings") self.label_port = wx.StaticText(self, -1, "port") self.combo_box_port = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.label_baudrate = wx.StaticText(self, -1, "baudrate") self.combo_box_baudrate = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.label_bytesize = wx.StaticText(self, -1, "bytesize") self.combo_box_bytesize = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.label_parity = wx.StaticText(self, -1, "parity") self.combo_box_parity = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.label_stopbits = wx.StaticText(self, -1, "stopbits") self.combo_box_stopbits = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN) self.radio_box_rtscts = wx.RadioBox(self, -1, "RTS/CTS", choices=["off", "on"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.radio_box_xonxoff = wx.RadioBox(self, -1, "xon/xoff", choices=["off", "on"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.button_cancel = wx.Button(self, wx.ID_CANCEL, "") self.button_ok = wx.Button(self, wx.ID_OK, "", style=wx.BU_RIGHT) self.__set_properties() self.__do_layout() self.__combo_init() self.Bind(wx.EVT_BUTTON, self.onButtonOk, self.button_ok) self.Bind(wx.EVT_BUTTON, self.onButtonCancel, self.button_cancel) # end wxGlade
Example #7
Source File: Settings.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Preferences.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((412, 183)) self.checklist_options = wx.CheckListBox(self, wx.ID_ANY, choices=[ "Invert Mouse Wheel Zoom", "Print Shutdown", ]) self.radio_units = wx.RadioBox(self, wx.ID_ANY, _("Units"), choices=[_("mm"), _("cm"), _("inch"), _("mils")], majorDimension=1, style=wx.RA_SPECIFY_ROWS) from wxMeerK40t import supported_languages choices = [language_name for language_code, language_name, language_index in supported_languages] self.combo_language = wx.ComboBox(self, wx.ID_ANY, choices=choices, style=wx.CB_DROPDOWN) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBOX, self.on_radio_units, self.radio_units) self.Bind(wx.EVT_COMBOBOX, self.on_combo_language, self.combo_language) self.Bind(wx.EVT_CHECKLISTBOX, self.on_checklist_settings, self.checklist_options) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #8
Source File: RasterProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: RasterProperty.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((359, 355)) self.spin_speed_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "200.0", min=0.0, max=500.0) self.spin_power_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "1000.0", min=0.0, max=1000.0) self.spin_step_size = wx.SpinCtrl(self, wx.ID_ANY, "1", min=0, max=63) self.combo_raster_direction = wx.ComboBox(self, wx.ID_ANY, choices=[_("Top To Bottom"), _("Bottom To Top"), _("Right To Left"), _("Left To Right")], style=wx.CB_DROPDOWN) self.spin_overscan_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "20.0", min=0.0, max=1000.0) self.radio_directional_raster = wx.RadioBox(self, wx.ID_ANY, _("Directional Raster"), choices=[_("Bidirectional"), _("Unidirectional")], majorDimension=2, style=wx.RA_SPECIFY_ROWS) self.radio_corner = wx.RadioBox(self, wx.ID_ANY, _("Start Corner"), choices=[" ", " ", " ", " "], majorDimension=2, style=wx.RA_SPECIFY_ROWS) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_SPINCTRL, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_TEXT, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_COMBOBOX, self.on_combo_raster_direction, self.combo_raster_direction) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_TEXT, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_RADIOBOX, self.on_radio_directional, self.radio_directional_raster) self.Bind(wx.EVT_RADIOBOX, self.on_radio_corner, self.radio_corner) # end wxGlade self.operation = None self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #9
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, data=0): panel = eg.ConfigPanel() radioBox = wx.RadioBox( panel, label=self.text.radioBoxLabel, choices=self.text.radioBoxOptions, style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(data) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection())
Example #10
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, switch=0): text=Text panel = eg.ConfigPanel(self) radioBox = wx.RadioBox( panel, -1, self.text.radiobox, choices=[self.text.AutoDJON, self.text.AutoDJOFF], style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(switch) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection(),)
Example #11
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, switch=0): text=Text panel = eg.ConfigPanel(self) radioBox = wx.RadioBox( panel, -1, self.text.radiobox, choices=[self.text.RepeatON, self.text.RepeatOFF], style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(switch) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection(),)
Example #12
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, switch=0): text=self.text panel = eg.ConfigPanel(self) radioBox = wx.RadioBox( panel, -1, text.radiobox, choices=text.choices, style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(switch) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection(),)
Example #13
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent): super(TabPanelPropSeg, self).__init__(parent=parent, id_=wx.ID_ANY) # Fetch input file self.hbox_filein = TextBox(self, label="Input file") # Select contrast lbl_contrasts = ['t1', 't2', 't2s', 'dwi'] self.rbox_contrast = wx.RadioBox(self, label='Select contrast:', choices=lbl_contrasts, majorDimension=1, style=wx.RA_SPECIFY_ROWS) # Display all options sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.hbox_filein.hbox, 0, wx.ALL, 5) sizer.Add(self.rbox_contrast, 0, wx.ALL, 5) # Run button button_run = wx.Button(self, id=wx.ID_ANY, label="Run") button_run.Bind(wx.EVT_BUTTON, self.on_button_run) sizer.Add(button_run, 0, wx.ALL, 5) # Add to main sizer self.sizer_h.Add(sizer) self.SetSizerAndFit(self.sizer_h)
Example #14
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Configure(self, action=2): panel = eg.ConfigPanel() radioBox = wx.RadioBox( panel, -1, self.text.radioBox, choices=self.text.actions, style=wx.RA_SPECIFY_ROWS ) radioBox.SetSelection(action) panel.sizer.Add(radioBox, 0, wx.EXPAND) while panel.Affirmed(): panel.SetResult(radioBox.GetSelection())
Example #15
Source File: PyOgg3.py From wxGlade with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: PyOgg3_MyDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER wx.Dialog.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, wx.ID_ANY) self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY) self.text_ctrl_1 = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, "") self.button_3 = wx.Button(self.notebook_1_pane_1, wx.ID_OPEN, "") self.notebook_1_pane_2 = wx.Panel(self.notebook_1, wx.ID_ANY) self.radio_box_1 = wx.RadioBox(self.notebook_1_pane_2, wx.ID_ANY, _("Sampling Rate"), choices=[_("44 kbit"), _("128 kbit")], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.notebook_1_pane_3 = wx.Panel(self.notebook_1, wx.ID_ANY) self.text_ctrl_2 = wx.TextCtrl(self.notebook_1_pane_3, wx.ID_ANY, "", style=wx.TE_MULTILINE) self.notebook_1_pane_4 = wx.Panel(self.notebook_1, wx.ID_ANY) self.label_2 = wx.StaticText(self.notebook_1_pane_4, wx.ID_ANY, _("File name:")) self.text_ctrl_3 = wx.TextCtrl(self.notebook_1_pane_4, wx.ID_ANY, "") self.button_4 = wx.Button(self.notebook_1_pane_4, wx.ID_OPEN, "") self.checkbox_1 = wx.CheckBox(self.notebook_1_pane_4, wx.ID_ANY, _("Overwrite existing file")) self.static_line_1 = wx.StaticLine(self, wx.ID_ANY) self.button_5 = wx.Button(self, wx.ID_CLOSE, "") self.button_2 = wx.Button(self, wx.ID_CANCEL, "", style=wx.BU_TOP) self.button_1 = wx.Button(self, wx.ID_OK, "", style=wx.BU_TOP) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.startConverting, self.button_1) # end wxGlade # manually added code print( 'Dialog has been created at ', time.asctime() )
Example #16
Source File: labeling_toolbox.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def addRadioButtons(self, bodyparts, fileIndex, markersize): """ Adds radio buttons for each bodypart on the right panel """ self.choiceBox = wx.BoxSizer(wx.VERTICAL) choices = [l for l in bodyparts] self.fieldradiobox = wx.RadioBox( self, label="Select a bodypart to label", style=wx.RA_SPECIFY_ROWS, choices=choices, ) self.slider = wx.Slider( self, -1, markersize, 1, markersize * 3, size=(250, -1), style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS, ) self.slider.Enable(False) self.checkBox = wx.CheckBox(self, id=wx.ID_ANY, label="Adjust marker size.") self.choiceBox.Add(self.slider, 0, wx.ALL, 5) self.choiceBox.Add(self.checkBox, 0, wx.ALL, 5) self.choiceBox.Add(self.fieldradiobox, 0, wx.EXPAND | wx.ALL, 10) self.SetSizerAndFit(self.choiceBox) self.Layout() return (self.choiceBox, self.fieldradiobox, self.slider, self.checkBox)
Example #17
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent): super(TabPanelRegisterToTemplate, self).__init__(parent=parent, id_=wx.ID_ANY) # Fetch input files self.hbox_im = TextBox(self, label="Input image") self.hbox_seg = TextBox(self, label="Input segmentation") self.hbox_label = TextBox(self, label="Input labels") # Select contrast lbl_contrasts = ['t1', 't2'] self.rbox_contrast = wx.RadioBox(self, label='Select contrast:', choices=lbl_contrasts, majorDimension=1, style=wx.RA_SPECIFY_ROWS) # Display all options sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.hbox_im.hbox, 0, wx.ALL, 5) sizer.Add(self.hbox_seg.hbox, 0, wx.ALL, 5) sizer.Add(self.hbox_label.hbox, 0, wx.ALL, 5) sizer.Add(self.rbox_contrast, 0, wx.ALL, 5) # Run button button_run = wx.Button(self, id=wx.ID_ANY, label="Run") button_run.Bind(wx.EVT_BUTTON, self.on_button_run) sizer.Add(button_run, 0, wx.ALL, 5) # Add to main sizer self.sizer_h.Add(sizer) self.SetSizerAndFit(self.sizer_h)
Example #18
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent): super(TabPanelVertLB, self).__init__(parent=parent, id_=wx.ID_ANY) # Fetch input files self.hbox_im = TextBox(self, label="Input image") self.hbox_seg = TextBox(self, label="Input segmentation") # Select contrast lbl_contrasts = ['t1', 't2'] self.rbox_contrast = wx.RadioBox(self, label='Select contrast:', choices=lbl_contrasts, majorDimension=1, style=wx.RA_SPECIFY_ROWS) # Display all options sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.hbox_im.hbox, 0, wx.ALL, 5) sizer.Add(self.hbox_seg.hbox, 0, wx.ALL, 5) sizer.Add(self.rbox_contrast, 0, wx.ALL, 5) # Run button button_run = wx.Button(self, id=wx.ID_ANY, label="Run") button_run.Bind(wx.EVT_BUTTON, self.on_button_run) sizer.Add(button_run, 0, wx.ALL, 5) # Add to main sizer self.sizer_h.Add(sizer) self.SetSizerAndFit(self.sizer_h)
Example #19
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent): super(TabPanelSCSeg, self).__init__(parent=parent, id_=wx.ID_ANY) # Fetch input file self.hbox_filein = TextBox(self, label="Input file") # Select contrast lbl_contrasts = ['t1', 't2', 't2s', 'dwi'] self.rbox_contrast = wx.RadioBox(self, label='Select contrast:', choices=lbl_contrasts, majorDimension=1, style=wx.RA_SPECIFY_ROWS) # Display all options sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.hbox_filein.hbox, 0, wx.ALL, 5) sizer.Add(self.rbox_contrast, 0, wx.ALL, 5) # Run button button_run = wx.Button(self, id=wx.ID_ANY, label="Run") button_run.Bind(wx.EVT_BUTTON, self.on_button_run) sizer.Add(button_run, 0, wx.ALL, 5) # Add to main sizer self.sizer_h.Add(sizer) self.SetSizerAndFit(self.sizer_h)