Python wx.CB_DROPDOWN Examples
The following are 25
code examples of wx.CB_DROPDOWN().
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: flagpage.py From magpy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def createControls(self): self.flagOptionsLabel = wx.StaticText(self, label="Flagging methods:") self.flagOutlierButton = wx.Button(self,-1,"Flag Outlier",size=(160,30)) self.flagRangeButton = wx.Button(self,-1,"Flag Range",size=(160,30)) self.flagMinButton = wx.Button(self,-1,"Flag Minimum",size=(160,30)) self.flagMaxButton = wx.Button(self,-1,"Flag Maximum",size=(160,30)) self.xCheckBox = wx.CheckBox(self,label="X ") self.yCheckBox = wx.CheckBox(self,label="Y ") self.zCheckBox = wx.CheckBox(self,label="Z ") self.fCheckBox = wx.CheckBox(self,label="F ") self.FlagIDText = wx.StaticText(self,label="Select Min/Max Flag ID:") self.FlagIDComboBox = wx.ComboBox(self, choices=self.flagidlist, style=wx.CB_DROPDOWN, value=self.flagidlist[3],size=(160,-1)) self.flagSelectionButton = wx.Button(self,-1,"Flag Selection",size=(160,30)) self.flagDropButton = wx.Button(self,-1,"Drop flagged",size=(160,30)) self.flagLoadButton = wx.Button(self,-1,"Load flags",size=(160,30)) self.flagSaveButton = wx.Button(self,-1,"Save flags",size=(160,30)) self.flagClearButton = wx.Button(self,-1,"Clear flags",size=(160,30))
Example #2
Source File: chronolapsegui.py From chronolapse with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: webcamConfigDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.testwebcambutton = wx.Button(self, wx.ID_ANY, _("Test Webcam")) self.webcamtimestampcheck = wx.CheckBox(self, wx.ID_ANY, _("Show Timestamp")) self.label_16 = wx.StaticText(self, wx.ID_ANY, _("Format:")) self.webcam_timestamp_format = wx.TextCtrl(self, wx.ID_ANY, _("%Y-%m-%d %H:%M:%S")) self.label_9 = wx.StaticText(self, wx.ID_ANY, _("File Prefix:")) self.webcamprefixtext = wx.TextCtrl(self, wx.ID_ANY, _("cam_")) self.label_10 = wx.StaticText(self, wx.ID_ANY, _("Save Folder:")) self.webcamsavefoldertext = wx.TextCtrl(self, wx.ID_ANY, "") self.webcamsavefolderbrowse = wx.Button(self, wx.ID_ANY, _("...")) self.label_11 = wx.StaticText(self, wx.ID_ANY, _("File Format:")) self.webcamformatcombo = wx.ComboBox(self, wx.ID_ANY, choices=[_("jpg"), _("png"), _("gif")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN) self.webcamsavebutton = wx.Button(self, wx.ID_OK, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.testWebcamPressed, self.testwebcambutton) self.Bind(wx.EVT_BUTTON, self.webcamSaveFolderBrowse, self.webcamsavefolderbrowse) # end wxGlade
Example #3
Source File: widget_pack.py From pyFileFixity with MIT License | 5 votes |
def build(self, parent, data): self.option_string = self.get_command(data) self.widget = wx.ComboBox( parent=parent, id=-1, value=safe_default(data, ''), choices=map(str, range(1, 11)), style=wx.CB_DROPDOWN ) return self.widget
Example #4
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 #5
Source File: CellEditor.py From bookhub with MIT License | 5 votes |
def MakeAutoCompleteComboBox(olv, columnIndex, maxObjectsToConsider=10000): """ Return a ComboBox that lets the user choose from all existing values in this column. Do not call for large lists """ col = olv.columns[columnIndex] maxObjectsToConsider = min(maxObjectsToConsider, olv.GetItemCount()) options = set(col.GetStringValue(olv.GetObjectAt(i)) for i in range(maxObjectsToConsider)) cb = wx.ComboBox(olv, choices=list(options), style=wx.CB_DROPDOWN|wx.CB_SORT|wx.TE_PROCESS_ENTER) AutoCompleteHelper(cb) return cb #-------------------------------------------------------------------------
Example #6
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 #7
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 #8
Source File: ImageProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: ImageProperty.__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((276, 218)) self.spin_step_size = wx.SpinCtrl(self, wx.ID_ANY, "1", min=1, max=63) self.combo_dpi = wx.ComboBox(self, wx.ID_ANY, choices=["1000", "500", "333", "250", "200", "166", "142", "125", "111", "100"], style=wx.CB_DROPDOWN) self.text_x = wx.TextCtrl(self, wx.ID_ANY, "") self.text_y = wx.TextCtrl(self, wx.ID_ANY, "") self.text_width = wx.TextCtrl(self, wx.ID_ANY, "") self.text_height = wx.TextCtrl(self, wx.ID_ANY, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRL, 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_dpi, self.combo_dpi) self.Bind(wx.EVT_TEXT, self.on_text_x, self.text_x) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_x, self.text_x) self.Bind(wx.EVT_TEXT, self.on_text_y, self.text_y) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_y, self.text_y) self.Bind(wx.EVT_TEXT, self.on_text_width, self.text_width) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_width, self.text_width) self.Bind(wx.EVT_TEXT, self.on_text_height, self.text_height) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_height, self.text_height) # end wxGlade self.image_element = 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, mesg=WM_COMMAND, wParam=0, lParam=0, kind=0): mesgValues, mesgNames = zip(*self.msgConstants) mesgValues, mesgNames = list(mesgValues), list(mesgNames) try: i = mesgValues.index(mesg) choice = mesgNames[i] except: choice = str(mesg) panel = eg.ConfigPanel() mesgCtrl = panel.ComboBox( choice, mesgNames, style=wx.CB_DROPDOWN, validator=eg.DigitOnlyValidator(mesgNames) ) wParamCtrl = panel.SpinIntCtrl(wParam, max=65535) lParamCtrl = panel.SpinIntCtrl(lParam, max=4294967295) kindCB = panel.CheckBox(kind == 1, self.text.text1) panel.AddLine("Message:", mesgCtrl) panel.AddLine("wParam:", wParamCtrl) panel.AddLine("lParam:", lParamCtrl) #panel.AddLine() panel.AddLine(kindCB) while panel.Affirmed(): choice = mesgCtrl.GetValue() try: i = mesgNames.index(choice) mesg = mesgValues[i] except: mesg = int(choice) panel.SetResult( mesg, wParamCtrl.GetValue(), lParamCtrl.GetValue(), 1 if kindCB.GetValue() else 0 )
Example #10
Source File: color_dialog.py From wxGlade with MIT License | 5 votes |
def __init__(self, colors_dict, parent=None): wx.Dialog.__init__(self, parent, -1, "") self.colors_dict = colors_dict choices = list( self.colors_dict.keys() ) choices.sort() self.panel_1 = wx.Panel(self, -1) self.use_null_color = wx.RadioButton( self.panel_1, -1, "wxNullColour", style=wx.RB_GROUP ) self.use_sys_color = wx.RadioButton( self.panel_1, -1, _("System Color") ) self.sys_color = wx.ComboBox( self.panel_1, -1, choices=choices, style=wx.CB_DROPDOWN | wx.CB_READONLY) self.sys_color_panel = wx.Panel(self.panel_1, -1, size=(250, 20)) self.sys_color_panel.SetBackgroundColour(wx.RED) self.use_chooser = wx.RadioButton(self.panel_1, -1, _("Custom Color")) self.color_chooser = PyColourChooser(self, -1) self.ok = wx.Button(self, wx.ID_OK, _("OK")) self.cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel")) self.__set_properties() self.__do_layout() self.use_null_color.Bind(wx.EVT_RADIOBUTTON, self.on_use_null_color) self.use_sys_color.Bind(wx.EVT_RADIOBUTTON, self.on_use_sys_color) self.use_chooser.Bind(wx.EVT_RADIOBUTTON, self.on_use_chooser) self.sys_color.Bind(wx.EVT_COMBOBOX, self.display_sys_color) self.display_sys_color() for ctrl in (self.use_null_color, self.use_sys_color, self.use_chooser): ctrl.Bind(wx.EVT_LEFT_DCLICK, lambda evt: self.EndModal(wx.ID_OK) )
Example #11
Source File: ctl_adm.py From admin4 with Apache License 2.0 | 5 votes |
def __init__(self, parentWin, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ComboBox.__init__(self, parentWin, id, "", pos, size, style=style | wx.CB_DROPDOWN|wx.CB_READONLY) self.keys={}
Example #12
Source File: dropdown.py From Gooey with MIT License | 5 votes |
def getWidget(self, parent, *args, **options): default = _('select_option') return wx.ComboBox( parent=parent, id=-1, # str conversion allows using stringyfiable values in addition to pure strings value=str(default), choices=[str(default)] + [str(choice) for choice in self._meta['choices']], style=wx.CB_DROPDOWN)
Example #13
Source File: chronolapsegui.py From chronolapse with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: screenshotConfigDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.dualmonitorscheck = wx.CheckBox(self, wx.ID_ANY, _("Capture Dual Monitors")) self.timestampcheck = wx.CheckBox(self, wx.ID_ANY, _("Show Timestamp")) self.label_16 = wx.StaticText(self, wx.ID_ANY, _("Format:")) self.screenshot_timestamp_format = wx.TextCtrl(self, wx.ID_ANY, _("%Y-%m-%d %H:%M:%S")) self.subsectioncheck = wx.CheckBox(self, wx.ID_ANY, _("Subsection")) self.label36 = wx.StaticText(self, wx.ID_ANY, _("Top:")) self.subsectiontop = wx.TextCtrl(self, wx.ID_ANY, "") self.label_36 = wx.StaticText(self, wx.ID_ANY, _("Left:")) self.subsectionleft = wx.TextCtrl(self, wx.ID_ANY, "") self.label_37 = wx.StaticText(self, wx.ID_ANY, _("Width:")) self.subsectionwidth = wx.TextCtrl(self, wx.ID_ANY, "") self.label_38 = wx.StaticText(self, wx.ID_ANY, _("Height:")) self.subsectionheight = wx.TextCtrl(self, wx.ID_ANY, "") self.label_5 = wx.StaticText(self, wx.ID_ANY, _("File Prefix:")) self.screenshotprefixtext = wx.TextCtrl(self, wx.ID_ANY, _("screen_")) self.label_6 = wx.StaticText(self, wx.ID_ANY, _("Save Folder:")) self.screenshotsavefoldertext = wx.TextCtrl(self, wx.ID_ANY, "") self.screenshotsavefolderbrowse = wx.Button(self, wx.ID_ANY, _("...")) self.label_7 = wx.StaticText(self, wx.ID_ANY, _("File Format:")) self.screenshotformatcombo = wx.ComboBox(self, wx.ID_ANY, choices=[_("jpg"), _("png"), _("gif")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN) self.screenshotconfigsave = wx.Button(self, wx.ID_OK, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.screenshotSaveFolderBrowse, self.screenshotsavefolderbrowse) # end wxGlade
Example #14
Source File: widget_pack.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def build(self, parent, data, choices=None): self.widget = wx.ComboBox( parent=parent, id=-1, value=self.default_value, choices=[self.default_value] + choices, style=wx.CB_DROPDOWN ) return self.widget
Example #15
Source File: widget_pack.py From pyFileFixity with MIT License | 5 votes |
def build(self, parent, data): self.option_string = self.get_command(data) self.widget = wx.ComboBox( parent=parent, id=-1, value=safe_default(data, self.default_value), choices=data['choices'], style=wx.CB_DROPDOWN ) return self.widget
Example #16
Source File: components.py From pyFileFixity with MIT License | 5 votes |
def BuildInputWidget(self, parent, action): levels = [str(x) for x in range(1, 7)] return wx.ComboBox( parent=parent, id=-1, value='', choices=levels, style=wx.CB_DROPDOWN )
Example #17
Source File: components.py From pyFileFixity with MIT License | 5 votes |
def BuildInputWidget(self, parent, action): return wx.ComboBox( parent=parent, id=-1, value=self._DEFAULT_VALUE, choices=action.choices, style=wx.CB_DROPDOWN )
Example #18
Source File: ReaderToolbar.py From pyscard with GNU Lesser General Public License v2.1 | 5 votes |
def __init__(self, parent): """Constructor. Registers as ReaderObserver to get notifications of reader insertion/removal.""" wx.ComboBox.__init__(self, parent, wx.NewId(), size=(170, -1), style=wx.CB_DROPDOWN | wx.CB_SORT, choices=[]) # register as a ReaderObserver; we will get # notified of added/removed readers self.readermonitor = ReaderMonitor() self.readermonitor.addObserver(self)
Example #19
Source File: absolutespage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def createControls(self): self.sourceLabel = wx.StaticText(self, label="Data source:") self.diLabel = wx.StaticText(self, label="Actions:") self.loadDIButton = wx.Button(self,-1,"DI data",size=(160,30)) self.diSourceLabel = wx.StaticText(self, label="Source: None") self.diTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.defineVarioScalarButton = wx.Button(self,-1,"Vario/Scalar",size=(160,30)) self.VarioSourceLabel = wx.StaticText(self, label="Vario: None") self.ScalarSourceLabel = wx.StaticText(self, label="Scalar: None") self.varioTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.defineParameterButton = wx.Button(self,-1,"Analysis parameter",size=(160,30)) self.parameterRadioBox = wx.RadioBox(self,label="parameter source",choices=self.choices, majorDimension=2, style=wx.RA_SPECIFY_COLS,size=(160,50)) #self.parameterTextCtrl = wx.TextCtrl(self, value="Default",size=(160,30), # style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.scalarTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.AnalyzeButton = wx.Button(self,-1,"Analyze",size=(160,30)) self.logLabel = wx.StaticText(self, label="Logging:") #self.exportButton = wx.Button(self,-1,"Export...",size=(160,30)) self.ClearLogButton = wx.Button(self,-1,"Clear Log",size=(160,30)) self.SaveLogButton = wx.Button(self,-1,"Save Log",size=(160,30)) self.dilogTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,200), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) #self.varioExtComboBox = wx.ComboBox(self, choices=self.varioext, # style=wx.CB_DROPDOWN, value=self.varioext[0],size=(160,-1)) #self.scalarExtComboBox = wx.ComboBox(self, choices=self.scalarext, # style=wx.CB_DROPDOWN, value=self.scalarext[0],size=(160,-1))
Example #20
Source File: widget_pack.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def build(self, parent, data, choices=None): self.widget = wx.ComboBox( parent=parent, id=-1, value='', choices=map(str, range(1, 11)), style=wx.CB_DROPDOWN ) return self.widget
Example #21
Source File: OpenDialog.py From BitTorrent with GNU General Public License v3.0 | 4 votes |
def __init__(self, parent, bitmap, browse, history, *a, **kw): BTDialog.__init__(self, parent, *a, **kw) itemDialog1 = self self.browse_func = browse itemFlexGridSizer2 = wx.FlexGridSizer(3, 1, 3, 0) itemFlexGridSizer2.AddGrowableCol(0) itemDialog1.SetSizer(itemFlexGridSizer2) itemFlexGridSizer3 = wx.FlexGridSizer(2, 2, 21, 0) itemFlexGridSizer3.AddGrowableCol(1) itemFlexGridSizer2.Add(itemFlexGridSizer3, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) itemStaticBitmap4Bitmap = bitmap #itemStaticBitmap4 = wx.StaticBitmap(itemDialog1, wx.ID_STATIC, itemStaticBitmap4Bitmap) itemStaticBitmap4 = ElectroStaticBitmap(itemDialog1, itemStaticBitmap4Bitmap) itemFlexGridSizer3.Add(itemStaticBitmap4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) itemStaticText5 = wx.StaticText( itemDialog1, wx.ID_STATIC, _("Enter the URL or path to a torrent file on the Internet, your computer, or your network that you want to add."), wx.DefaultPosition, wx.DefaultSize, 0 ) if text_wrappable: itemStaticText5.Wrap(286) itemFlexGridSizer3.Add(itemStaticText5, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.ADJUST_MINSIZE, 7) itemStaticText6 = wx.StaticText( itemDialog1, wx.ID_STATIC, _("Open:"), wx.DefaultPosition, wx.DefaultSize, 0 ) itemFlexGridSizer3.Add(itemStaticText6, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.ADJUST_MINSIZE, 5) choiceboxStrings = history self.choicebox = wx.ComboBox( itemDialog1, ID_COMBOBOX, choices=choiceboxStrings, size=(267, -1), style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER ) self.choicebox.Bind(wx.EVT_TEXT, self.OnText) self.choicebox.Bind(wx.EVT_COMBOBOX, self.OnComboBox) self.choicebox.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnter) itemFlexGridSizer3.Add(self.choicebox, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.GROW|wx.ALL, 5) itemBoxSizer8 = wx.BoxSizer(wx.HORIZONTAL) itemFlexGridSizer2.Add(itemBoxSizer8, 0, wx.ALIGN_RIGHT|wx.ALIGN_BOTTOM|wx.TOP|wx.BOTTOM, 1) itemFlexGridSizer9 = wx.FlexGridSizer(2, 3, 0, 2) itemFlexGridSizer9.AddGrowableRow(0) itemBoxSizer8.Add(itemFlexGridSizer9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 7) itemBoxSizer10 = wx.BoxSizer(wx.HORIZONTAL) itemFlexGridSizer9.Add(itemBoxSizer10, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 2) self.okbutton = wx.Button(itemDialog1, wx.ID_OK) itemBoxSizer10.Add(self.okbutton, 0, wx.GROW|wx.ALL|wx.SHAPED, 0) itemBoxSizer12 = wx.BoxSizer(wx.HORIZONTAL) itemFlexGridSizer9.Add(itemBoxSizer12, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 2) itemButton13 = wx.Button(itemDialog1, wx.ID_CANCEL) itemBoxSizer12.Add(itemButton13, 0, wx.GROW|wx.ALL|wx.SHAPED, 0) itemBoxSizer14 = wx.BoxSizer(wx.HORIZONTAL) itemFlexGridSizer9.Add(itemBoxSizer14, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 2) itemButton15 = wx.Button( itemDialog1, ID_BROWSE, _("&Browse"), wx.DefaultPosition, wx.DefaultSize, 0 ) itemButton15.Bind(wx.EVT_BUTTON, self.browse) itemBoxSizer14.Add(itemButton15, 0, wx.GROW|wx.ALL|wx.SHAPED, 0) self.okbutton.Disable() self.Fit()
Example #22
Source File: systray.py From p2ptv-pi with MIT License | 4 votes |
def __init__(self, bgapp, icons): self.bgapp = bgapp self.user_profile = self.bgapp.user_profile wx.Dialog.__init__(self, None, -1, self.bgapp.appname + ' ' + self.bgapp.utility.lang.get('user_profile'), size=(400, 200), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) self.SetIcons(icons) grid = wx.GridBagSizer(hgap=5, vgap=8) grid.AddGrowableCol(1, 1) row = -1 row += 1 label = wx.StaticText(self, wx.ID_ANY, self.bgapp.utility.lang.get('gender')) self.ctrl_gender = wx.ComboBox(self, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) for id, name in self.user_profile.get_genders().iteritems(): name = self.bgapp.utility.lang.get(name) idx = self.ctrl_gender.Append(name, id) if id == self.user_profile.get_gender_id(): self.ctrl_gender.Select(idx) grid.Add(label, pos=(row, 0)) grid.Add(self.ctrl_gender, pos=(row, 1)) row += 1 label = wx.StaticText(self, wx.ID_ANY, self.bgapp.utility.lang.get('age')) self.ctrl_age = wx.ComboBox(self, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) ages = [] for id, name in self.user_profile.get_ages().iteritems(): if name.startswith('age_less'): priority = '' elif name.startswith('age_more'): priority = 'z' else: priority = name ages.append((priority, {'id': id, 'name': name})) for priority, age in sorted(ages): id = age['id'] name = age['name'] name = self.bgapp.utility.lang.get(name) idx = self.ctrl_age.Append(name, id) if id == self.user_profile.get_age_id(): self.ctrl_age.Select(idx) grid.Add(label, pos=(row, 0)) grid.Add(self.ctrl_age, pos=(row, 1)) btn_ok = wx.Button(self, wx.ID_OK, self.bgapp.utility.lang.get('ok')) btn_cancel = wx.Button(self, wx.ID_CANCEL, self.bgapp.utility.lang.get('cancel')) buttonbox = wx.BoxSizer(wx.HORIZONTAL) buttonbox.Add(btn_ok, 0, wx.ALL, 5) buttonbox.Add(btn_cancel, 0, wx.ALL, 5) mainbox = wx.BoxSizer(wx.VERTICAL) mainbox.Add(grid, 1, wx.EXPAND | wx.ALL, border=5) mainbox.Add(buttonbox, 0) self.SetSizerAndFit(mainbox) self.Show() self.Bind(wx.EVT_BUTTON, self.OnOK, btn_ok)
Example #23
Source File: developpage.py From magpy with BSD 3-Clause "New" or "Revised" License | 4 votes |
def createControls(self): self.DrawButton = wx.Button(self,-1,"Draw/Recalc") self.SaveVarioButton = wx.Button(self,-1,"Save data") self.dateLabel = wx.StaticText(self, label="Insert time range:") self.startdateLabel = wx.StaticText(self, label="Start date:") self.startDatePicker = wx.DatePickerCtrl(self, dt=wx.DateTimeFromTimeT(time.mktime(datetime.strptime("2011-10-22","%Y-%m-%d").timetuple()))) self.enddateLabel = wx.StaticText(self, label="End date:") self.endDatePicker = wx.DatePickerCtrl(self, dt=wx.DateTimeFromTimeT(time.mktime(datetime.strptime("2011-10-22","%Y-%m-%d").timetuple()))) self.instLabel = wx.StaticText(self, label="Select variometer:") self.resolutionLabel = wx.StaticText(self, label="Select resolution:") self.scalarLabel = wx.StaticText(self, label="Select F source:") self.scalarReviewedLabel = wx.StaticText(self, label="only reviewed!") self.varioComboBox = wx.ComboBox(self, choices=self.varios, style=wx.CB_DROPDOWN, value=self.varios[0]) self.overrideAutoBaselineButton = wx.Button(self,-1,"Manual base.") self.baselinefileTextCtrl = wx.TextCtrl(self, value="--") self.baselinefileTextCtrl.Disable() self.scalarComboBox = wx.ComboBox(self, choices=self.scalars, style=wx.CB_DROPDOWN, value=self.scalars[0]) self.resolutionComboBox = wx.ComboBox(self, choices=self.resolution, style=wx.CB_DROPDOWN, value=self.resolution[0]) self.datatypeLabel = wx.StaticText(self, label="Select datatype:") self.datatypeComboBox = wx.ComboBox(self, choices=self.datatype, style=wx.CB_DROPDOWN, value=self.datatype[1]) self.drawRadioBox = wx.RadioBox(self, label="Select vector components", choices=self.comp, majorDimension=3, style=wx.RA_SPECIFY_COLS) self.addoptLabel = wx.StaticText(self, label="Optional graphs:") self.baselinecorrCheckBox = wx.CheckBox(self,label="Baseline corr.") self.fCheckBox = wx.CheckBox(self,label="Plot F") self.dfCheckBox = wx.CheckBox(self,label="calculate dF") self.dfCheckBox.Disable() self.tCheckBox = wx.CheckBox(self,label="Plot T") self.showFlaggedCheckBox = wx.CheckBox(self, label="show flagged") self.curdateTextCtrl = wx.TextCtrl(self, value="--") self.curdateTextCtrl.Disable() self.prevdateTextCtrl = wx.TextCtrl(self, value="--") self.prevdateTextCtrl.Disable() self.GetGraphMarksButton = wx.Button(self,-1,"Get marks") self.flagSingleButton = wx.Button(self,-1,"Flag date") self.flagRangeButton = wx.Button(self,-1,"Flag range") self.curselecteddateLabel = wx.StaticText(self, label="Current sel.") self.prevselecteddateLabel = wx.StaticText(self, label="Previous sel.") self.dfIniTextCtrl = wx.TextCtrl(self, value="dF(ini): 0 nT") self.dfCurTextCtrl = wx.TextCtrl(self, value="dF(cur): --") self.dfIniTextCtrl.Disable() self.dfCurTextCtrl.Disable()
Example #24
Source File: streampage.py From magpy with BSD 3-Clause "New" or "Revised" License | 4 votes |
def createControls(self): self.lineLabel1 = wx.StaticText(self, label=" ") self.lineLabel2 = wx.StaticText(self, label=" ") self.lineLabel3 = wx.StaticText(self, label=" ") self.lineLabel4 = wx.StaticText(self, label=" ") self.pathLabel = wx.StaticText(self, label="Path/Source:") self.pathTextCtrl = wx.TextCtrl(self, value="") self.fileLabel = wx.StaticText(self, label="File/Table:") self.fileTextCtrl = wx.TextCtrl(self, value="*") self.startdateLabel = wx.StaticText(self, label="Start date:") self.startDatePicker = wxDatePickerCtrl(self, style=wxDP_DEFAULT) # the following line produces error in my win xp installation self.startTimePicker = wx.TextCtrl(self, value="00:00:00") self.enddateLabel = wx.StaticText(self, label="End date:") self.endDatePicker = wxDatePickerCtrl(self, style=wxDP_DEFAULT) self.endTimePicker = wx.TextCtrl(self, value=datetime.now().strftime('%X')) self.trimStreamButton = wx.Button(self,-1,"Trim timerange",size=(160,30)) self.plotOptionsLabel = wx.StaticText(self, label="Plotting options:") #self.flagOptionsLabel = wx.StaticText(self, label="Flagging methods:") self.selectKeysButton = wx.Button(self,-1,"Select Columns",size=(160,30)) self.dropKeysButton = wx.Button(self,-1,"Drop Columns",size=(160,30)) self.extractValuesButton = wx.Button(self,-1,"Extract Values",size=(160,30)) self.restoreButton = wx.Button(self,-1,"Restore data",size=(160,30)) self.changePlotButton = wx.Button(self,-1,"Plot Options",size=(160,30)) self.dailyMeansButton = wx.Button(self,-1,"Daily Means",size=(160,30)) self.applyBCButton = wx.Button(self,-1,"Baseline Corr",size=(160,30)) self.getGapsButton = wx.Button(self,-1,"Get gaps",size=(160,30)) #self.flagOutlierButton = wx.Button(self,-1,"Flag Outlier",size=(160,30)) #self.flagRangeButton = wx.Button(self,-1,"Flag Range",size=(160,30)) #self.flagMinButton = wx.Button(self,-1,"Flag Minimum",size=(160,30)) #self.flagMaxButton = wx.Button(self,-1,"Flag Maximum",size=(160,30)) #self.xCheckBox = wx.CheckBox(self,label="X ") #self.yCheckBox = wx.CheckBox(self,label="Y ") #self.zCheckBox = wx.CheckBox(self,label="Z ") #self.fCheckBox = wx.CheckBox(self,label="F ") #self.FlagIDText = wx.StaticText(self,label="Select Min/Max Flag ID:") #self.FlagIDComboBox = wx.ComboBox(self, choices=self.flagidlist, # style=wx.CB_DROPDOWN, value=self.flagidlist[3],size=(160,-1)) #self.flagSelectionButton = wx.Button(self,-1,"Flag Selection",size=(160,30)) #self.flagDropButton = wx.Button(self,-1,"Drop flagged",size=(160,30)) #self.flagLoadButton = wx.Button(self,-1,"Load flags",size=(160,30)) #self.flagSaveButton = wx.Button(self,-1,"Save flags",size=(160,30)) #self.flagClearButton = wx.Button(self,-1,"Clear flags",size=(160,30)) self.compRadioBox = wx.RadioBox(self, label="Select components", choices=self.comp, majorDimension=3, style=wx.RA_SPECIFY_COLS) self.symbolRadioBox = wx.RadioBox(self, label="Select symbols", choices=self.symbol, majorDimension=2, style=wx.RA_SPECIFY_COLS) self.annotateCheckBox = wx.CheckBox(self,label="annotate") self.errorBarsCheckBox = wx.CheckBox(self,label="error bars") self.confinexCheckBox = wx.CheckBox(self, label="confine time") self.compRadioBox.Disable() self.symbolRadioBox.Disable() #self.dailyMeansButton.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.NORMAL))
Example #25
Source File: analysispage.py From magpy with BSD 3-Clause "New" or "Revised" License | 4 votes |
def createControls(self): # TODO Methods: # filter, derivative, offset, fit, baseline, k_fmi, get_min, get_max, mean, delta_f, rotation, spectrogam, powerspec, smooth self.head1Label = wx.StaticText(self, label="Basic methods:") # derivative, fit, rotation self.head2Label = wx.StaticText(self, label="Get values:") # mean, max, min self.head3Label = wx.StaticText(self, label="Manipulation:") # filter, smooth, offset self.head4Label = wx.StaticText(self, label="Geomagnetic methods:") # frequency range self.head5Label = wx.StaticText(self, label="Frequency range:") #self.head5Label = wx.StaticText(self, label="Multiple streams:") # merge, subtract, stack # display continuous statistics self.head6Label = wx.StaticText(self, label="Continuous statistics:") # 1 Line self.derivativeButton = wx.Button(self,-1,"Derivative",size=(160,30)) self.rotationButton = wx.Button(self,-1,"Rotation",size=(160,30)) self.fitButton = wx.Button(self,-1,"Fit",size=(160,30)) # 2 Line self.meanButton = wx.Button(self,-1,"Mean",size=(160,30)) self.maxButton = wx.Button(self,-1,"Maxima",size=(160,30)) self.minButton = wx.Button(self,-1,"Minima",size=(160,30)) self.flagmodButton = wx.Button(self,-1,"Flags",size=(160,30)) # 3 Line self.offsetButton = wx.Button(self,-1,"Offsets",size=(160,30)) self.filterButton = wx.Button(self,-1,"Filter",size=(160,30)) self.smoothButton = wx.Button(self,-1,"Smooth",size=(160,30)) self.resampleButton = wx.Button(self,-1,"Resample",size=(160,30)) # 4 Line self.activityButton = wx.Button(self,-1,"Activity",size=(160,30)) self.deltafButton = wx.Button(self,-1,"Delta F",size=(160,30)) self.baselineButton = wx.Button(self,-1,"Baseline",size=(160,30)) self.calcfButton = wx.Button(self,-1,"Calculate F",size=(160,30)) # 5 Line self.powerButton = wx.Button(self,-1,"Power",size=(160,30)) self.spectrumButton = wx.Button(self,-1,"Spectrum",size=(160,30)) # 6 Line self.statsButton = wx.Button(self,-1,"Show Statistics",size=(160,30)) # 5 Line #self.mergeButton = wx.Button(self,-1,"Merge",size=(160,30)) #self.subtractButton = wx.Button(self,-1,"Subtract",size=(160,30)) #self.stackButton = wx.Button(self,-1,"Stack/Average",size=(160,30)) # 3. Section #self.selectfilterLabel = wx.StaticText(self, label="Select type:") #self.selectfilterComboBox = wx.ComboBox(self, choices=self.filterlist, # style=wx.CB_DROPDOWN, value=self.filterlist[14]) #self.selectlengthLabel = wx.StaticText(self, label="Select length:") #self.selectlengthComboBox = wx.ComboBox(self, choices=self.filterlength, # style=wx.CB_DROPDOWN, value=self.filterlength[0])