当前位置: 首页>>代码示例>>Python>>正文


Python wx.CB_DROPDOWN属性代码示例

本文整理汇总了Python中wx.CB_DROPDOWN属性的典型用法代码示例。如果您正苦于以下问题:Python wx.CB_DROPDOWN属性的具体用法?Python wx.CB_DROPDOWN怎么用?Python wx.CB_DROPDOWN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.CB_DROPDOWN属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: createControls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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)) 
开发者ID:geomagpy,项目名称:magpy,代码行数:20,代码来源:flagpage.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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 
开发者ID:collingreen,项目名称:chronolapse,代码行数:25,代码来源:chronolapsegui.py

示例3: build

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:11,代码来源:widget_pack.py

示例4: createControls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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)) 
开发者ID:geomagpy,项目名称:magpy,代码行数:31,代码来源:absolutespage.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) 
开发者ID:LudovicRousseau,项目名称:pyscard,代码行数:13,代码来源:ReaderToolbar.py

示例6: BuildInputWidget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
def BuildInputWidget(self, parent, action):
    return wx.ComboBox(
        parent=parent,
        id=-1,
        value=self._DEFAULT_VALUE,
        choices=action.choices,
        style=wx.CB_DROPDOWN
    ) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:10,代码来源:components.py

示例7: build

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:12,代码来源:widget_pack.py

示例8: getWidget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) 
开发者ID:chriskiehl,项目名称:Gooey,代码行数:11,代码来源:dropdown.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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={} 
开发者ID:andreas-p,项目名称:admin4,代码行数:5,代码来源:ctl_adm.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) ) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:29,代码来源:color_dialog.py

示例11: Configure

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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
            ) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:43,代码来源:__init__.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:34,代码来源:ImageProperty.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:37,代码来源:RasterProperty.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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) 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:32,代码来源:Settings.py

示例15: MakeAutoCompleteComboBox

# 需要导入模块: import wx [as 别名]
# 或者: from wx import CB_DROPDOWN [as 别名]
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


#------------------------------------------------------------------------- 
开发者ID:JackonYang,项目名称:bookhub,代码行数:17,代码来源:CellEditor.py


注:本文中的wx.CB_DROPDOWN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。