Python wx.StaticBoxSizer() Examples
The following are 30
code examples of wx.StaticBoxSizer().
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: cfgdlg.py From trelby with GNU General Public License v2.0 | 6 votes |
def addTextStyles(self, name, prefix, parent): hsizer = wx.StaticBoxSizer(wx.StaticBox(parent, -1, name), wx.HORIZONTAL) gsizer = wx.FlexGridSizer(2, 2, 0, 10) # wxGTK adds way more space by default than wxMSW between the # items, have to adjust for that pad = 0 if misc.isWindows: pad = 5 self.addCheckBox("Caps", prefix, parent, gsizer, pad) self.addCheckBox("Italic", prefix, parent, gsizer, pad) self.addCheckBox("Bold", prefix, parent, gsizer, pad) self.addCheckBox("Underlined", prefix, parent, gsizer, pad) hsizer.Add(gsizer, 0, wx.EXPAND) return hsizer
Example #2
Source File: displayDialog.py From Zulu with GNU Affero General Public License v3.0 | 6 votes |
def __do_layout(self): # begin wxGlade: DisplayDialog.__do_layout sizer_3 = wx.BoxSizer(wx.VERTICAL) sizer_6 = wx.BoxSizer(wx.HORIZONTAL) sizer_5 = wx.StaticBoxSizer(self.sizer_5_staticbox, wx.HORIZONTAL) sizer_4 = wx.BoxSizer(wx.HORIZONTAL) sizer_4.Add(self.radio_box_crlf, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 10) sizer_4.Add(self.radio_box_echo, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 10) sizer_4.Add(self.radio_box_unprintable, 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 10) sizer_3.Add(sizer_4, 0, wx.ALL|wx.EXPAND, 8) sizer_5.Add(self.button_font, 0, wx.ALL|wx.EXPAND, 2) sizer_5.Add(self.button_forecolor, 1, wx.ALL|wx.EXPAND, 2) sizer_5.Add(self.button_backcolor, 1, wx.ALL, 2) sizer_3.Add(sizer_5, 1, wx.EXPAND, 0) sizer_6.Add(self.button_cancel, 0, wx.LEFT|wx.ALIGN_BOTTOM, 8) sizer_6.Add(self.button_ok, 0, wx.LEFT|wx.ALIGN_BOTTOM, 60) sizer_3.Add(sizer_6, 1, wx.ALL|wx.EXPAND, 5) self.SetSizer(sizer_3) sizer_3.Fit(self) self.Layout() # end wxGlade
Example #3
Source File: settingsDialog.py From Zulu with GNU Affero General Public License v3.0 | 6 votes |
def __do_layout(self): # begin wxGlade: SerialDialog.__do_layout sizer_4 = wx.StaticBoxSizer(self.sizer_4_staticbox, wx.HORIZONTAL) grid_sizer_3 = wx.FlexGridSizer(7, 2, 2, 2) grid_sizer_3.Add(self.label_port, 0, wx.LEFT, 8) grid_sizer_3.Add(self.combo_box_port, 0, 0, 0) grid_sizer_3.Add(self.label_baudrate, 0, wx.LEFT, 8) grid_sizer_3.Add(self.combo_box_baudrate, 0, 0, 0) grid_sizer_3.Add(self.label_bytesize, 0, wx.LEFT, 8) grid_sizer_3.Add(self.combo_box_bytesize, 0, 0, 0) grid_sizer_3.Add(self.label_parity, 0, wx.LEFT, 8) grid_sizer_3.Add(self.combo_box_parity, 0, 0, 0) grid_sizer_3.Add(self.label_stopbits, 0, wx.LEFT, 8) grid_sizer_3.Add(self.combo_box_stopbits, 0, 0, 0) grid_sizer_3.Add(self.radio_box_rtscts, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 8) grid_sizer_3.Add(self.radio_box_xonxoff, 0, wx.LEFT|wx.TOP|wx.BOTTOM|wx.ALIGN_RIGHT, 8) grid_sizer_3.Add(self.button_cancel, 0, 0, 0) grid_sizer_3.Add(self.button_ok, 0, wx.ALIGN_RIGHT, 0) sizer_4.Add(grid_sizer_3, 1, wx.ALL|wx.EXPAND, 6) self.SetSizer(sizer_4) sizer_4.Fit(self) self.Layout() # end wxGlade
Example #4
Source File: Main_Dialog.py From topoflow with MIT License | 6 votes |
def Add_Plotting_Panel(self): #--------------------------------------------------- # Create a "static box" and associated sizer for # everything but the bottom buttons. Static boxes # provide a frame and a title for grouping. #--------------------------------------------------- panel = self.main_panel box = wx.StaticBox(panel, -1, "Plotting Options:") sizer = wx.StaticBoxSizer(box, wx.VERTICAL) self.plotting_sizer = sizer #--------------------------------------- # Add run_info_sizer to the main_sizer # and then hide it #--------------------------------------- self.main_sizer.Add(sizer, 0, wx.ALL, self.vgap) self.main_sizer.Hide(sizer) #----------------------------------------------------------------
Example #5
Source File: Main_Dialog.py From topoflow with MIT License | 6 votes |
def Add_Preprocessing_Panel(self): #--------------------------------------------------- # Create a "static box" and associated sizer for # everything but the bottom buttons. Static boxes # provide a frame and a title for grouping. #--------------------------------------------------- panel = self.main_panel box = wx.StaticBox(panel, -1, "Preprocessing Tools:") sizer = wx.StaticBoxSizer(box, wx.VERTICAL) self.preprocessing_sizer = sizer #--------------------------------------- # Add run_info_sizer to the main_sizer # and then hide it #--------------------------------------- self.main_sizer.Add(sizer, 0, wx.ALL, self.vgap) self.main_sizer.Hide(sizer) # Add_Preprocessing_Panel() #----------------------------------------------------------------
Example #6
Source File: wx_mpl_dynamic_graph.py From code-for-blog with The Unlicense | 6 votes |
def __init__(self, parent, ID, label, initval): wx.Panel.__init__(self, parent, ID) self.value = initval box = wx.StaticBox(self, -1, label) sizer = wx.StaticBoxSizer(box, wx.VERTICAL) self.radio_auto = wx.RadioButton(self, -1, label="Auto", style=wx.RB_GROUP) self.radio_manual = wx.RadioButton(self, -1, label="Manual") self.manual_text = wx.TextCtrl(self, -1, size=(35,-1), value=str(initval), style=wx.TE_PROCESS_ENTER) self.Bind(wx.EVT_UPDATE_UI, self.on_update_manual_text, self.manual_text) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_enter, self.manual_text) manual_box = wx.BoxSizer(wx.HORIZONTAL) manual_box.Add(self.radio_manual, flag=wx.ALIGN_CENTER_VERTICAL) manual_box.Add(self.manual_text, flag=wx.ALIGN_CENTER_VERTICAL) sizer.Add(self.radio_auto, 0, wx.ALL, 10) sizer.Add(manual_box, 0, wx.ALL, 10) self.SetSizer(sizer) sizer.Fit(self)
Example #7
Source File: PanelClass.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: DebugPanel.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) self.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, "")) sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, "sizer_2"), wx.VERTICAL) sizer_2.Add((0, 0), 0, 0, 0) self.SetSizer(sizer_2) self.Layout() # end wxGlade # end of class DebugPanel
Example #8
Source File: crash_on_cut_paste.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MeasurementFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetSize((400, 340)) self.SetTitle("ATV Tester") sizer_limit = wx.BoxSizer(wx.VERTICAL) self.panel_3 = wx.Panel(self, wx.ID_ANY) sizer_limit.Add(self.panel_3, 1, wx.EXPAND, 0) sizer_8 = wx.StaticBoxSizer(wx.StaticBox(self.panel_3, wx.ID_ANY, "History"), wx.VERTICAL) self.panel_3.SetSizer(sizer_8) self.SetSizer(sizer_limit) self.Layout() # end wxGlade # end of class MeasurementFrame
Example #9
Source File: new_properties.py From wxGlade with MIT License | 6 votes |
def create_editor(self, panel, sizer): self._choices = [] tooltips = self._create_tooltip_text() for box_label in self.styles.keys(): static_box = wx.StaticBox(panel, -1, box_label, style=wx.FULL_REPAINT_ON_RESIZE) box_sizer = wx.StaticBoxSizer(static_box, wx.VERTICAL) for style in self.styles[box_label]: checkbox = wx.CheckBox(panel, -1, style) if style in tooltips: compat.SetToolTip(checkbox, tooltips[style]) self._choices.append(checkbox) box_sizer.Add(checkbox) sizer.Add(box_sizer, 0, wx.ALL | wx.EXPAND, 5) self.update_display(True) for checkbox in self._choices: if checkbox is None: continue # derived classes may not use all options, e.g. obsolete ones checkbox.Bind(wx.EVT_CHECKBOX, self.on_checkbox)
Example #10
Source File: panel.py From admin4 with Apache License 2.0 | 6 votes |
def __init__(self, parent, label, xxx): ParamPage.__init__(self, parent, xxx) box = wx.StaticBox(self, -1, label) box.SetFont(g.labelFont()) topSizer = wx.StaticBoxSizer(box, wx.VERTICAL) sizer = wx.FlexGridSizer(len(xxx.styles), 2, 0, 1) sizer.AddGrowableCol(1) for param in xxx.styles: present = xxx.params.has_key(param) check = wx.CheckBox(self, paramIDs[param], param + ':', size = (LABEL_WIDTH,-1), name = param) check.SetValue(present) control = paramDict[param](self, name = param) control.Enable(present) sizer.AddMany([ (check, 0, wx.ALIGN_CENTER_VERTICAL), (control, 0, wx.ALIGN_CENTER_VERTICAL | wx.GROW) ]) self.checks[param] = check self.controls[param] = control topSizer.Add(sizer, 1, wx.ALL | wx.EXPAND, 3) self.SetAutoLayout(True) self.SetSizer(topSizer) topSizer.Fit(self) # Set data for a cahced page
Example #11
Source File: tydesk.py From tydesk with GNU General Public License v3.0 | 6 votes |
def InitUI(self): pnl = wx.Panel(self) vbox = wx.BoxSizer(wx.VERTICAL) sb = wx.StaticBox(pnl, label=u'请输入员工号') sbs = wx.StaticBoxSizer(sb, orient=wx.VERTICAL) self.tcCheckin = wx.TextCtrl(pnl) sbs.Add(self.tcCheckin, 0, wx.ALL|wx.EXPAND, 5) pnl.SetSizer(sbs) hbox2 = wx.BoxSizer(wx.HORIZONTAL) okButton = wx.Button(self, label=u'确认') closeButton = wx.Button(self, label=u'取消') hbox2.Add(okButton) hbox2.Add(closeButton, flag=wx.LEFT, border=5) vbox.Add(pnl, 0, wx.ALL|wx.EXPAND, 5) vbox.Add(hbox2, 0, wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, 10) self.SetSizer(vbox) self.Layout() okButton.Bind(wx.EVT_BUTTON, self.OnConfirm) closeButton.Bind(wx.EVT_BUTTON, self.OnClose)
Example #12
Source File: commondialogs.py From CANFestivino with GNU Lesser General Public License v2.1 | 6 votes |
def _init_sizers(self): self.flexGridSizer1 = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10) self.MainSizer = wx.BoxSizer(wx.HORIZONTAL) self.LeftGridSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=5) self.RightBoxSizer = wx.StaticBoxSizer(self.staticBox1, wx.VERTICAL) self.RightBoxGridSizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=10) self._init_coll_flexGridSizer1_Items(self.flexGridSizer1) self._init_coll_flexGridSizer1_Growables(self.flexGridSizer1) self._init_coll_MainSizer_Items(self.MainSizer) self._init_coll_LeftGridSizer_Items(self.LeftGridSizer) self._init_coll_LeftGridSizer_Growables(self.LeftGridSizer) self._init_coll_RightBoxSizer_Items(self.RightBoxSizer) self._init_coll_RightBoxGridSizer_Items(self.RightBoxGridSizer) self._init_coll_RightBoxGridSizer_Growables(self.RightBoxGridSizer) self.SetSizer(self.flexGridSizer1)
Example #13
Source File: optionsframe.py From youtube-dl-gui with The Unlicense | 6 votes |
def _build_filesize_sizer(self): filesize_box_sizer = wx.StaticBoxSizer(self.filesize_box, wx.VERTICAL) border = wx.GridBagSizer(5, 20) border.Add(self.filesize_max_label, (0, 0), (1, 2), wx.ALIGN_CENTER_HORIZONTAL) border.Add(self.filesize_max_spinctrl, (1, 0)) border.Add(self.filesize_max_sizeunit_combobox, (1, 1)) border.Add(self.filesize_min_label, (2, 0), (1, 2), wx.ALIGN_CENTER_HORIZONTAL) border.Add(self.filesize_min_spinctrl, (3, 0)) border.Add(self.filesize_min_sizeunit_combobox, (3, 1)) filesize_box_sizer.Add(border, flag=wx.ALIGN_CENTER) return filesize_box_sizer
Example #14
Source File: radio_group.py From Gooey with MIT License | 6 votes |
def arrange(self, *args, **kwargs): title = getin(self.widgetInfo, ['options', 'title'], _('choose_one')) if getin(self.widgetInfo, ['options', 'show_border'], False): boxDetails = wx.StaticBox(self, -1, title) boxSizer = wx.StaticBoxSizer(boxDetails, wx.VERTICAL) else: title = wx_util.h1(self, title) title.SetForegroundColour(self._options['label_color']) boxSizer = wx.BoxSizer(wx.VERTICAL) boxSizer.AddSpacer(10) boxSizer.Add(title, 0) for btn, widget in zip(self.radioButtons, self.widgets): sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(btn,0, wx.RIGHT, 4) sizer.Add(widget, 1, wx.EXPAND) boxSizer.Add(sizer, 0, wx.ALL | wx.EXPAND, 5) self.SetSizer(boxSizer)
Example #15
Source File: GUI_wxPython.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 6 votes |
def addStaticBoxWithLabels(self): boxSizerH = wx.BoxSizer(wx.HORIZONTAL) staticBox = wx.StaticBox( self.panel, -1, "Labels within a Frame" ) staticBoxSizerV = wx.StaticBoxSizer( staticBox, wx.VERTICAL ) boxSizerV = wx.BoxSizer( wx.VERTICAL ) staticText1 = wx.StaticText( self.panel, -1, " Choose a number:" ) boxSizerV.Add( staticText1, 0, wx.ALL) staticText2 = wx.StaticText( self.panel, -1, " Label 2") boxSizerV.Add( staticText2, 0, wx.ALL ) #------------------------------------------------------ staticBoxSizerV.Add( boxSizerV, 0, wx.ALL ) boxSizerH.Add(staticBoxSizerV) #------------------------------------------------------ boxSizerH.Add(wx.ComboBox(self.panel, size=(70, -1))) #------------------------------------------------------ boxSizerH.Add(wx.SpinCtrl(self.panel, size=(50, -1), style=wx.BORDER_RAISED)) # Add local boxSizer to main frame self.statBoxSizerV.Add( boxSizerH, 1, wx.ALL ) #----------------------------------------------------------
Example #16
Source File: optionsframe.py From youtube-dl-gui with The Unlicense | 6 votes |
def _build_playlist_sizer(self): playlist_box_sizer = wx.StaticBoxSizer(self.playlist_box, wx.VERTICAL) playlist_box_sizer.AddSpacer((-1, 10)) border = wx.GridBagSizer(5, 40) border.Add(self.playlist_start_label, (0, 0), flag=wx.ALIGN_CENTER_VERTICAL) border.Add(self.playlist_start_spinctrl, (0, 1)) border.Add(self.playlist_stop_label, (1, 0), flag=wx.ALIGN_CENTER_VERTICAL) border.Add(self.playlist_stop_spinctrl, (1, 1)) border.Add(self.playlist_max_label, (2, 0), flag=wx.ALIGN_CENTER_VERTICAL) border.Add(self.playlist_max_spinctrl, (2, 1)) playlist_box_sizer.Add(border, flag=wx.ALIGN_CENTER) return playlist_box_sizer
Example #17
Source File: GUI_wxPython.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 6 votes |
def addStaticBoxWithLabels(self): boxSizerH = wx.BoxSizer(wx.HORIZONTAL) staticBox = wx.StaticBox( self.panel, -1, "Labels within a Frame" ) staticBoxSizerV = wx.StaticBoxSizer( staticBox, wx.VERTICAL ) boxSizerV = wx.BoxSizer( wx.VERTICAL ) staticText1 = wx.StaticText( self.panel, -1, " Choose a number:" ) boxSizerV.Add( staticText1, 0, wx.ALL) staticText2 = wx.StaticText( self.panel, -1, " Label 2") boxSizerV.Add( staticText2, 0, wx.ALL ) #------------------------------------------------------ staticBoxSizerV.Add( boxSizerV, 0, wx.ALL ) boxSizerH.Add(staticBoxSizerV) #------------------------------------------------------ boxSizerH.Add(wx.ComboBox(self.panel, size=(70, -1))) #------------------------------------------------------ boxSizerH.Add(wx.SpinCtrl(self.panel, size=(50, -1), style=wx.BORDER_RAISED)) # Add local boxSizer to main frame self.statBoxSizerV.Add( boxSizerH, 1, wx.ALL ) #----------------------------------------------------------
Example #18
Source File: templates_ui.py From wxGlade with MIT License | 5 votes |
def __do_layout(self): # begin wxGlade: TemplateInfoDialog.__do_layout sizer_1 = wx.BoxSizer(wx.VERTICAL) sizer_6 = wx.BoxSizer(wx.HORIZONTAL) sizer_5 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Instructions")), wx.HORIZONTAL) sizer_4 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Description")), wx.HORIZONTAL) sizer_3 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Author")), wx.HORIZONTAL) sizer_2 = wx.BoxSizer(wx.HORIZONTAL) label_template_name = wx.StaticText(self, wx.ID_ANY, _("wxGlade template: ")) label_template_name.SetFont(wx.Font(-1, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, "")) sizer_2.Add(label_template_name, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10) sizer_2.Add(self.template_name, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10) sizer_1.Add(sizer_2, 0, wx.EXPAND, 0) sizer_3.Add(self.author, 1, 0, 0) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 5) sizer_4.Add(self.description, 1, wx.EXPAND, 0) sizer_1.Add(sizer_4, 1, wx.ALL | wx.EXPAND, 5) sizer_5.Add(self.instructions, 1, wx.EXPAND, 0) sizer_1.Add(sizer_5, 1, wx.ALL | wx.EXPAND, 5) sizer_6.Add(self.button_1, 0, 0, 0) sizer_6.Add(self.button_2, 0, wx.LEFT, 10) sizer_1.Add(sizer_6, 0, wx.ALIGN_RIGHT | wx.ALL, 10) self.SetSizer(sizer_1) self.Layout() self.Centre() # end wxGlade # end of class TemplateInfoDialog
Example #19
Source File: components.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def do_layout(self, parent, titles, msgs): self.panel = wx.Panel(parent) self.radio_buttons = [wx.RadioButton(self.panel, -1) for _ in titles] self.btn_names = [wx.StaticText(self.panel, label=title.title()) for title in titles] self.help_msgs = [wx.StaticText(self.panel, label=msg.title()) for msg in msgs] # box = wx.StaticBox(self.panel, -1, label=self.data['group_name']) box = wx.StaticBox(self.panel, -1, label='') vertical_container = wx.StaticBoxSizer(box, wx.VERTICAL) for button, name, help in zip(self.radio_buttons, self.btn_names, self.help_msgs): hbox = wx.BoxSizer(wx.HORIZONTAL) hbox.Add(button, 0, wx.ALIGN_TOP | wx.ALIGN_LEFT) hbox.Add(name, 0, wx.LEFT, 10) vertical_container.Add(hbox, 0, wx.EXPAND) vertical_container.Add(help, 1, wx.EXPAND | wx.LEFT, 25) vertical_container.AddSpacer(5) self.panel.SetSizer(vertical_container) self.panel.Bind(wx.EVT_SIZE, self.onResize) self.panel.Bind(wx.EVT_RADIOBUTTON, self.showz) return self.panel
Example #20
Source File: components.py From pyFileFixity with MIT License | 5 votes |
def do_layout(self, parent): self.panel = wx.Panel(parent) self.radio_buttons = [wx.RadioButton(self.panel, -1) for _ in self.data] self.btn_names = [wx.StaticText(self.panel, label=btn_data['display_name'].title()) for btn_data in self.data] self.help_msgs = [wx.StaticText(self.panel, label=btn_data['help'].title()) for btn_data in self.data] self.option_stings = [btn_data['commands'] for btn_data in self.data] # box = wx.StaticBox(self.panel, -1, label=self.data['group_name']) box = wx.StaticBox(self.panel, -1, label='Set Verbosity Level') vertical_container = wx.StaticBoxSizer(box, wx.VERTICAL) for button, name, help in zip(self.radio_buttons, self.btn_names, self.help_msgs): hbox = wx.BoxSizer(wx.HORIZONTAL) hbox.Add(button, 0, wx.ALIGN_TOP | wx.ALIGN_LEFT) hbox.Add(name, 0, wx.LEFT, 10) vertical_container.Add(hbox, 0, wx.EXPAND) vertical_container.Add(help, 1, wx.EXPAND | wx.LEFT, 25) vertical_container.AddSpacer(5) # self.panel.Bind(wx.EVT_RADIOBUTTON, self.onSetter, button) self.panel.SetSizer(vertical_container) self.panel.Bind(wx.EVT_SIZE, self.onResize) return self.panel
Example #21
Source File: gui.py From superpaper with MIT License | 5 votes |
def create_sizer_paths(self): self.sizer_setting_paths = wx.StaticBoxSizer(wx.VERTICAL, self, "Wallpaper paths") self.statbox_parent_paths = self.sizer_setting_paths.GetStaticBox() st_paths_info = wx.StaticText(self.statbox_parent_paths, -1, "Browse to add your wallpaper files or source folders here:") if self.use_multi_image: self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1, style=wx.LC_REPORT | wx.BORDER_SIMPLE | wx.LC_SORT_ASCENDING ) self.path_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width = 100) self.path_listctrl.InsertColumn(1, 'Source', width = 400) else: # show simpler listing without header if only one wallpaper target self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1, style=wx.LC_REPORT | wx.BORDER_SIMPLE | wx.LC_NO_HEADER ) self.path_listctrl.InsertColumn(0, 'Source', width = 500) self.path_listctrl.SetImageList(self.image_list, wx.IMAGE_LIST_SMALL) self.sizer_setting_paths.Add(st_paths_info, 0, wx.ALIGN_LEFT|wx.ALL, 5) self.sizer_setting_paths.Add( self.path_listctrl, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5 ) # Buttons self.sizer_setting_paths_buttons = wx.BoxSizer(wx.HORIZONTAL) self.button_browse = wx.Button(self.statbox_parent_paths, label="Browse") self.button_remove_source = wx.Button(self.statbox_parent_paths, label="Remove selected source") self.button_browse.Bind(wx.EVT_BUTTON, self.onBrowsePaths) self.button_remove_source.Bind(wx.EVT_BUTTON, self.onRemoveSource) self.sizer_setting_paths_buttons.Add(self.button_browse, 0, wx.CENTER|wx.ALL, 5) self.sizer_setting_paths_buttons.Add(self.button_remove_source, 0, wx.CENTER|wx.ALL, 5) # add button sizer to parent paths sizer self.sizer_setting_paths.Add(self.sizer_setting_paths_buttons, 0, wx.CENTER|wx.EXPAND|wx.ALL, 0) self.sizer_settings_right.Add( self.sizer_setting_paths, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5 )
Example #22
Source File: dialogs.py From wxGlade with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MakeRowColGrowableDlg.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.SetTitle("Make row and/or column growable") sizer_1 = wx.BoxSizer(wx.VERTICAL) static_text_1 = wx.StaticText(self, wx.ID_ANY, "You have set a widget's layout to EXPAND.\n\nThe containing row and column are not growable.\nSo EXPAND does not have an effect.") sizer_1.Add(static_text_1, 0, wx.ALL | wx.EXPAND, 8) sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, "Make growable"), wx.VERTICAL) sizer_1.Add(sizer_2, 1, wx.ALL | wx.EXPAND, 6) self.cb_row_growable = wx.CheckBox(self, wx.ID_ANY, "Row") sizer_2.Add(self.cb_row_growable, 0, wx.ALL, 4) self.cb_col_growable = wx.CheckBox(self, wx.ID_ANY, "Column") sizer_2.Add(self.cb_col_growable, 0, wx.ALL, 4) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 2) self.cb_dont_show_again = wx.CheckBox(self, wx.ID_ANY, "Don't show this dialog again") sizer_3.Add(self.cb_dont_show_again, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5) sizer_3.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) self.button_OK = wx.Button(self, wx.ID_OK, "") sizer_3.Add(self.button_OK, 0, wx.ALIGN_CENTER | wx.ALL, 5) self.SetSizer(sizer_1) sizer_1.Fit(self) self.Layout() # end wxGlade # end of class MakeRowColGrowableDlg
Example #23
Source File: edit_sizers.py From wxGlade with MIT License | 5 votes |
def destroying_child_widget(self, child, index): # previously in _free_slot # required here; otherwise removal of a StaticBox of a StaticBoxSizer will cause a crash # child has been removed from self.children already, # except when a widget is re-created or a slot is just set to overlapped self.widget.Detach(child.widget)
Example #24
Source File: edit_sizers.py From wxGlade with MIT License | 5 votes |
def SetItemMinSize(self, item, w, h): if w==-1 or h==-1: try: w2, h2 = item.GetBestSize() if w == -1: w = w2 if h == -1: h = h2 except AttributeError: pass wx.StaticBoxSizer.SetItemMinSize(self, item, w, h)
Example #25
Source File: GUI_wxPython.py From Python-GUI-Programming-Cookbook-Second-Edition with MIT License | 5 votes |
def createManageFilesFrame(self): staticBox = wx.StaticBox( self.panel, -1, "Manage Files", size=(285, -1) ) self.statBoxSizerMgrV = wx.StaticBoxSizer(staticBox, wx.VERTICAL) #----------------------------------------------------------
Example #26
Source File: BoxedGroup.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, label="", *items): staticBox = wx.StaticBox(parent, -1, label) wx.StaticBoxSizer.__init__(self, staticBox, wx.VERTICAL) self.items = [] for item in items: lineSizer = wx.BoxSizer(wx.HORIZONTAL) if isinstance(item, types.StringTypes): labelCtrl = wx.StaticText(parent, -1, item) lineSizer.Add( labelCtrl, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5 ) self.items.append([labelCtrl]) elif isinstance(item, (types.ListType, types.TupleType)): lineItems = [] for subitem in item: if isinstance(subitem, types.StringTypes): subitem = wx.StaticText(parent, -1, subitem) lineSizer.Add( subitem, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5 ) else: lineSizer.Add( subitem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5 ) lineItems.append(subitem) self.items.append(lineItems) else: lineSizer.Add(item, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5) self.items.append([item]) self.Add(lineSizer, 0, wx.EXPAND)
Example #27
Source File: ControlProviderMixin.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def VStaticBoxSizer(self, label, *items): staticBox = wx.StaticBox(self, -1, label) sizer = wx.StaticBoxSizer(staticBox, wx.VERTICAL) sizer.AddMany(items) return sizer
Example #28
Source File: PathProperty.py From meerk40t with MIT License | 5 votes |
def __do_layout(self): # begin wxGlade: PathProperty.__do_layout sizer_8 = wx.BoxSizer(wx.VERTICAL) sizer_6 = wx.BoxSizer(wx.HORIZONTAL) sizer_9 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Fill Color")), wx.VERTICAL) sizer_7 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Stroke Color")), wx.VERTICAL) sizer_8.Add(self.text_name, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_none, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_F00, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_0F0, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_00F, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_F0F, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_0FF, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_FF0, 0, wx.EXPAND, 0) sizer_7.Add(self.button_stroke_000, 0, wx.EXPAND, 0) sizer_6.Add(sizer_7, 1, wx.EXPAND, 0) sizer_9.Add(self.button_fill_none, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_F00, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_0F0, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_00F, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_F0F, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_0FF, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_FF0, 0, wx.EXPAND, 0) sizer_9.Add(self.button_fill_000, 0, wx.EXPAND, 0) sizer_6.Add(sizer_9, 1, wx.EXPAND, 0) sizer_8.Add(sizer_6, 1, wx.EXPAND, 0) self.SetSizer(sizer_8) self.Layout() self.Centre() # end wxGlade
Example #29
Source File: RotarySettings.py From meerk40t with MIT License | 5 votes |
def __do_layout(self): # begin wxGlade: RotarySettings.__do_layout sizer_main = wx.BoxSizer(wx.VERTICAL) sizer_circumference = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Object Circumference")), wx.HORIZONTAL) sizer_20 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Roller Circumference")), wx.HORIZONTAL) sizer_steps = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Rotation Steps")), wx.HORIZONTAL) sizer_x = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Scale X")), wx.HORIZONTAL) sizer_y = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Scale Y")), wx.HORIZONTAL) sizer_main.Add(self.checkbox_rotary, 0, 0, 0) sizer_y.Add(self.spin_rotary_scaley, 0, 0, 0) sizer_main.Add(sizer_y, 0, wx.EXPAND, 0) sizer_x.Add(self.spin_rotary_scalex, 0, 0, 0) sizer_main.Add(sizer_x, 0, wx.EXPAND, 0) sizer_main.Add((20, 20), 0, 0, 0) sizer_main.Add(self.checkbox_rotary_loop, 0, 0, 0) sizer_steps.Add(self.spin_rotary_rotation, 0, 0, 0) label_steps = wx.StaticText(self, wx.ID_ANY, _("steps")) sizer_steps.Add(label_steps, 0, 0, 0) sizer_main.Add(sizer_steps, 0, wx.EXPAND, 0) sizer_20.Add(self.checkbox_rotary_roller, 0, 0, 0) sizer_20.Add(self.spin_rotary_roller_circumference, 0, 0, 0) label_mm = wx.StaticText(self, wx.ID_ANY, _("mm")) sizer_20.Add(label_mm, 0, 0, 0) sizer_main.Add(sizer_20, 0, wx.EXPAND, 0) sizer_circumference.Add(self.spin_rotary_object_circumference, 0, 0, 0) label_mm2 = wx.StaticText(self, wx.ID_ANY, _("mm")) sizer_circumference.Add(label_mm2, 0, 0, 0) sizer_main.Add(sizer_circumference, 0, wx.EXPAND, 0) self.SetSizer(sizer_main) self.Layout() # end wxGlade
Example #30
Source File: JobInfo.py From meerk40t with MIT License | 5 votes |
def __do_layout(self): # begin wxGlade: JobInfo.__do_layout sizer_2 = wx.BoxSizer(wx.VERTICAL) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Operations and Commands")), wx.HORIZONTAL) sizer_1.Add(self.operations_listbox, 10, wx.EXPAND, 0) sizer_1.Add(self.commands_listbox, 3, wx.EXPAND, 0) sizer_2.Add(sizer_1, 10, wx.EXPAND, 0) sizer_3.Add(self.button_writer_control, 1, wx.EXPAND, 0) sizer_3.Add(self.button_job_spooler, 0, 0, 0) sizer_2.Add(sizer_3, 1, wx.EXPAND, 0) self.SetSizer(sizer_2) self.Layout() self.Centre() # end wxGlade