Python wx 模块,EVT_COMBOBOX 实例源码

我们从Python开源项目中,提取了以下36个代码示例,用于说明如何使用wx.EVT_COMBOBOX

项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initMethod(self):
        methodControlBox = widgets.ControlBox(self, label='Method', orient=wx.VERTICAL)
        self.methodComboBox = wx.ComboBox(self, value=self.pg.method,
                style=wx.CB_READONLY, choices=('Welch Power', 'Autoregressive'))
        self.Bind(wx.EVT_COMBOBOX, self.setMethod, self.methodComboBox)
        self.offlineControls += [self.methodComboBox]
        methodControlBox.Add(self.methodComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(methodControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.methodConfigSizer = wx.BoxSizer(orient=wx.VERTICAL)

        self.welchPanel = WelchConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.welchPanel, proportion=1, flag=wx.EXPAND)

        self.autoregPanel = AutoregConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.autoregPanel, proportion=1, flag=wx.EXPAND)

        self.sizer.Add(self.methodConfigSizer, proportion=1, flag=wx.EXPAND)

        self.methodConfig = self.welchPanel
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initOptions(self):
        optionsSizer = wx.BoxSizer(wx.HORIZONTAL)

        kernTypeControlBox = widgets.ControlBox(self, label='Kernel Type', orient=wx.HORIZONTAL)
        self.kernTypeComboBox = wx.ComboBox(self, choices=self.flt.kernMap.keys(),
            value=self.flt.kernType, style=wx.CB_DROPDOWN)
        self.Bind(wx.EVT_COMBOBOX, self.setKernType, self.kernTypeComboBox)
        kernTypeControlBox.Add(self.kernTypeComboBox, proportion=1, flag=wx.ALL, border=8)
        optionsSizer.Add(kernTypeControlBox, proportion=1,
                flag=wx.ALL | wx.ALIGN_CENTER, border=8)

        widthControlBox = widgets.ControlBox(self, label='Width', orient=wx.HORIZONTAL)
        self.widthSpinCtrl = wx.SpinCtrl(self, value=str(self.flt.width), min=2, max=100)
        self.Bind(wx.EVT_SPINCTRL, self.setWidth, self.widthSpinCtrl)
        widthControlBox.Add(self.widthSpinCtrl, proportion=1, flag=wx.ALL, border=8)
        optionsSizer.Add(widthControlBox, proportion=0,
                flag=wx.TOP | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=8)

        self.sizer.Add(optionsSizer, proportion=0)#, flag=wx.EXPAND)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initOptions(self):
        STransConfigPanel.initOptions(self)

        optionsSizer = wx.BoxSizer(wx.HORIZONTAL)

        kurtosisControlBox = widgets.ControlBox(self, label='Kurtosis', orient=wx.VERTICAL)
        self.kurtosisComboBox = wx.ComboBox(self, choices=('Adapt', 'Sub', 'Super'),
            value=self.flt.kurtosis, style=wx.CB_DROPDOWN)
        self.Bind(wx.EVT_COMBOBOX, self.setKurtosis, self.kurtosisComboBox)
        kurtosisControlBox.Add(self.kurtosisComboBox, proportion=1, flag=wx.ALL, border=8)
        optionsSizer.Add(kurtosisControlBox, proportion=1,
                flag=wx.LEFT | wx.RIGHT, border=8)

        maxIterControlBox = widgets.ControlBox(self, label='Max Iter.', orient=wx.HORIZONTAL)
        self.maxIterSpinCtrl = wx.SpinCtrl(self, value=str(self.flt.maxIter), min=50, max=3500)
        self.Bind(wx.EVT_SPINCTRL, self.setMaxIter, self.maxIterSpinCtrl)
        maxIterControlBox.Add(self.maxIterSpinCtrl, proportion=1,
                flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL, border=8)
        optionsSizer.Add(maxIterControlBox, proportion=0,
                flag=wx.RIGHT | wx.EXPAND, border=8)

        #lrControlBox = widgets.ControlBox(self, label='Learning Rate.', orient=wx.HORIZONTAL)

        self.sizer.Add(optionsSizer, proportion=0)
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sms_dialoge.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.THICK_FRAME
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_5 = wx.Panel(self, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Username"))
        self.combo_box_1 = wx.ComboBox(self.panel_5, wx.ID_ANY, choices=[("Select"), ("admin"), ("teacher")], style=wx.CB_READONLY|wx.CB_DROPDOWN)
        self.label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Password"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.button_1 = wx.Button(self.panel_5, wx.ID_ANY, ("Cancel"))
        self.button_2 = wx.Button(self.panel_5, wx.ID_ANY, ("Login"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_user, self.combo_box_1)
        self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.on_login, self.button_2)

        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress)
        self.Bind(wx.EVT_CLOSE,self.on_close,self)
        self.UO=user_operations(self)
        # end wxGlade
项目:PandasDataFrameGUI    作者:bluenote10    | 项目源码 | 文件源码
def __init__(self, parent, columns, df_list_ctrl, change_callback):
        wx.Panel.__init__(self, parent)

        columns_with_neutral_selection = [''] + list(columns)
        self.columns = columns
        self.df_list_ctrl = df_list_ctrl
        self.change_callback = change_callback

        self.num_filters = 10

        self.main_sizer = wx.BoxSizer(wx.VERTICAL)

        self.combo_boxes = []
        self.text_controls = []

        for i in range(self.num_filters):
            combo_box = wx.ComboBox(self, choices=columns_with_neutral_selection, style=wx.CB_READONLY)
            text_ctrl = wx.TextCtrl(self, wx.ID_ANY, '')

            self.Bind(wx.EVT_COMBOBOX, self.on_combo_box_select)
            self.Bind(wx.EVT_TEXT, self.on_text_change)

            row_sizer = wx.BoxSizer(wx.HORIZONTAL)
            row_sizer.Add(combo_box, 0, wx.ALL, 5)
            row_sizer.Add(text_ctrl, 1, wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, 5)

            self.combo_boxes.append(combo_box)
            self.text_controls.append(text_ctrl)
            self.main_sizer.Add(row_sizer, 0, wx.EXPAND)

        self.SetSizer(self.main_sizer)
项目:PandasDataFrameGUI    作者:bluenote10    | 项目源码 | 文件源码
def __init__(self, parent, columns, df_list_ctrl):
        wx.Panel.__init__(self, parent)

        columns_with_neutral_selection = [''] + list(columns)
        self.columns = columns
        self.df_list_ctrl = df_list_ctrl

        self.figure = Figure(facecolor="white", figsize=(1, 1))
        self.axes = self.figure.add_subplot(111)
        self.canvas = FigureCanvas(self, -1, self.figure)

        chart_toolbar = NavigationToolbar2Wx(self.canvas)

        self.combo_box1 = wx.ComboBox(self, choices=columns_with_neutral_selection, style=wx.CB_READONLY)

        self.Bind(wx.EVT_COMBOBOX, self.on_combo_box_select)

        row_sizer = wx.BoxSizer(wx.HORIZONTAL)
        row_sizer.Add(self.combo_box1, 0, wx.ALL | wx.ALIGN_CENTER, 5)
        row_sizer.Add(chart_toolbar, 0, wx.ALL, 5)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.canvas, 1, flag=wx.EXPAND, border=5)
        sizer.Add(row_sizer)
        self.SetSizer(sizer)
项目:PandasDataFrameGUI    作者:bluenote10    | 项目源码 | 文件源码
def __init__(self, parent, columns, df_list_ctrl):
        wx.Panel.__init__(self, parent)

        columns_with_neutral_selection = [''] + list(columns)
        self.columns = columns
        self.df_list_ctrl = df_list_ctrl

        self.figure = Figure(facecolor="white", figsize=(1, 1))
        self.axes = self.figure.add_subplot(111)
        self.canvas = FigureCanvas(self, -1, self.figure)

        chart_toolbar = NavigationToolbar2Wx(self.canvas)

        self.combo_box1 = wx.ComboBox(self, choices=columns_with_neutral_selection, style=wx.CB_READONLY)
        self.combo_box2 = wx.ComboBox(self, choices=columns_with_neutral_selection, style=wx.CB_READONLY)

        self.Bind(wx.EVT_COMBOBOX, self.on_combo_box_select)

        row_sizer = wx.BoxSizer(wx.HORIZONTAL)
        row_sizer.Add(self.combo_box1, 0, wx.ALL | wx.ALIGN_CENTER, 5)
        row_sizer.Add(self.combo_box2, 0, wx.ALL | wx.ALIGN_CENTER, 5)
        row_sizer.Add(chart_toolbar, 0, wx.ALL, 5)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.canvas, 1, flag=wx.EXPAND, border=5)
        sizer.Add(row_sizer)
        self.SetSizer(sizer)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initMethod(self):
        methodControlBox = widgets.ControlBox(self, label='Method', orient=wx.VERTICAL)
        self.methodComboBox = wx.ComboBox(self, value=self.pg.method,
                style=wx.CB_READONLY, choices=('Welch Power', 'Autoregressive', 'Time Embedded Net', 'Convolutional Net'))
        self.Bind(wx.EVT_COMBOBOX, self.setMethod, self.methodComboBox)
        self.offlineControls += [self.methodComboBox]
        methodControlBox.Add(self.methodComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(methodControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.methodConfigSizer = wx.BoxSizer(orient=wx.VERTICAL)

        self.welchPanel = WelchConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.welchPanel, proportion=1, flag=wx.EXPAND)

        self.autoregPanel = AutoregConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.autoregPanel, proportion=1, flag=wx.EXPAND)

        self.tdeNetPanel = ConvNetConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.tdeNetPanel, proportion=1, flag=wx.EXPAND)

        self.convNetPanel = ConvNetConfigPanel(self, pg=self.pg, cp=self)
        self.methodConfigSizer.Add(self.convNetPanel, proportion=1, flag=wx.EXPAND)

        self.sizer.Add(self.methodConfigSizer, proportion=1, flag=wx.EXPAND)

        self.methodConfig = self.welchPanel
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initClassifierKind(self):
        classifierKindControlBox = widgets.ControlBox(self, label='Classifier', orient=wx.VERTICAL)
        self.classifierKindComboBox = wx.ComboBox(self, value=self.pg.classifierKind,
                style=wx.CB_READONLY, choices=self.pg.classifierChoices)
        self.Bind(wx.EVT_COMBOBOX, self.setClassifierKind, self.classifierKindComboBox)
        self.offlineControls += [self.classifierKindComboBox]
        classifierKindControlBox.Add(self.classifierKindComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(classifierKindControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initClassifier(self):
        classifierKindControlBox = widgets.ControlBox(self, label='Classifier', orient=wx.VERTICAL)
        self.classifierKindComboBox = wx.ComboBox(self, value=self.pg.classifierKind,
                style=wx.CB_READONLY, choices=self.pg.classifierChoices)
        self.Bind(wx.EVT_COMBOBOX, self.setClassifierKind, self.classifierKindComboBox)
        self.offlineControls += [self.classifierKindComboBox]
        classifierKindControlBox.Add(self.classifierKindComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(classifierKindControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initClassifierKind(self):
        classifierControlBox = widgets.ControlBox(self, label='Classifier', orient=wx.VERTICAL)
        self.classifierKindComboBox = wx.ComboBox(self, value=self.pg.classifierKind,
                style=wx.CB_READONLY, choices=self.pg.classifierChoices)
        self.Bind(wx.EVT_COMBOBOX, self.setClassifier, self.classifierKindComboBox)
        self.offlineControls += [self.classifierKindComboBox]
        classifierControlBox.Add(self.classifierKindComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(classifierControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initClassifier(self):
        classifierKindControlBox = widgets.ControlBox(self, label='Classifier', orient=wx.VERTICAL)
        self.classifierKindComboBox = wx.ComboBox(self, value=self.pg.classifierKind.upper(),
                style=wx.CB_READONLY, choices=('LDA', 'NN'))
        self.Bind(wx.EVT_COMBOBOX, self.setClassifierKind, self.classifierKindComboBox)
        self.offlineControls += [self.classifierKindComboBox]
        classifierKindControlBox.Add(self.classifierKindComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(classifierKindControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initSigControls(self):
        """Initialize signal controls.
        """
        sigSizer = wx.BoxSizer(orient=wx.VERTICAL)

        distControlBox = widgets.ControlBox(self, label='Distribution', orient=wx.VERTICAL)

        self.distComboBox = wx.ComboBox(self, choices=list(distributions.keys()),
            value='uniform', style=wx.CB_SORT | wx.CB_READONLY)
        self.distComboBox.Bind(wx.EVT_COMBOBOX, self.setDist, self.distComboBox)
        distControlBox.Add(self.distComboBox, proportion=0, flag=wx.ALL, border=10)

        self.walkCheckBox = wx.CheckBox(self, label='Walk')
        self.walkCheckBox.Bind(wx.EVT_CHECKBOX, self.setWalk, self.walkCheckBox)
        distControlBox.Add(self.walkCheckBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT, border=10)

        sigSizer.Add(distControlBox, proportion=0, flag=wx.ALL, border=10)

        scaleControlBox = widgets.ControlBox(self, label='Scale', orient=wx.HORIZONTAL)

        self.scaleText = wx.StaticText(self, label='%4.1f' % 1.0)
        scaleTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        scaleTextSizer.Add(self.scaleText, proportion=1, flag=wx.EXPAND)
        self.scaleSlider = wx.Slider(self, style=wx.SL_HORIZONTAL, value=10, minValue=1, maxValue=300)
        self.Bind(wx.EVT_SLIDER, self.setScale, self.scaleSlider)

        scaleControlBox.Add(scaleTextSizer, proportion=0, flag=wx.ALL, border=10)
        scaleControlBox.Add(self.scaleSlider, proportion=1, flag=wx.ALL | wx.EXPAND, border=10)

        sigSizer.Add(scaleControlBox, proportion=0,
                flag=wx.EXPAND | wx.LEFT | wx.BOTTOM | wx.RIGHT, border=10)

        self.sizer.Add(sigSizer)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initOptions(self):
        optionsSizer = wx.BoxSizer(wx.HORIZONTAL)

        self.filtTypeComboBox = wx.ComboBox(self, choices=self.flt.filtMap.keys(),
            value=self.flt.filtType, style=wx.CB_DROPDOWN)
        self.Bind(wx.EVT_COMBOBOX, self.setFiltType, self.filtTypeComboBox)
        optionsSizer.Add(self.filtTypeComboBox, proportion=1,
                flag=wx.LEFT | wx.TOP | wx.RIGHT | wx.ALIGN_CENTER, border=20)

        self.sizer.Add(optionsSizer, proportion=0)#, flag=wx.EXPAND)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, 190), size = wx.Size( 285,35 ), style = wx.TAB_TRAVERSAL )
        self.SetBackgroundColour((230,200,170)) #TESTING ONLY REMOVE WHEN SIZING IS DONE AND ALL THAT BUSINESS
        view_opts = ['System Config', 'Pigrow Setup', 'Camera Config', 'Cron Timing', 'multi-script', 'Local Files', 'Timelapse', 'Graphs', 'Live View', 'pieye watcher']
        #Showing only completed tabs
        view_opts = ['System Config', 'Pigrow Setup', 'Cron Timing', 'Local Files']
        self.view_cb = wx.ComboBox(self, choices = view_opts, pos=(10,2), size=(265, 30))
        self.view_cb.Bind(wx.EVT_COMBOBOX, self.view_combo_go)
项目:magic-card-database    作者:drknotter    | 项目源码 | 文件源码
def update_current_search_tab(self):

        sizer = self.current_sizer
        sizer.Clear(True)
        sizer.RemoveGrowableRow(0)
        sizer.RemoveGrowableRow(1)
        sizer.RemoveGrowableCol(0)
        sizer.RemoveGrowableCol(2)

        if( len(self.current_search) == 0 ):

            sizer.AddGrowableRow(0)
            sizer.AddGrowableCol(0)
            sizer.Add(wx.StaticText(parent=self.current_tab,label="There are no search items."),flag=wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL,pos=(0,0))

        else:

            sizer.AddGrowableCol(2)

            for i in range(len(self.current_search)):
                if i%2 == 0:
                    not_box = wx.ComboBox(parent=self.current_tab,value=self.current_search[i][0],choices=['','not'],style=wx.CB_READONLY,size=(60,-1),id=i/2)
                    not_box.Bind(wx.EVT_COMBOBOX,self.not_search_item)
                    sizer.Add(not_box,pos=(i,0),flag=wx.ALIGN_LEFT|wx.TOP,border=5)

                    key = self.current_search[i][1]
                    value = self.current_search[i][2]
                    sizer.Add(wx.StaticText(parent=self.current_tab,label=key+" = '"+value+"'"),pos=(i,1),flag=wx.TOP|wx.LEFT|wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL,border=5)

                    removeButton = wx.Button(self.current_tab,label='Remove',id=i/2)
                    removeButton.Bind(wx.EVT_BUTTON,self.remove_search_item)
                    sizer.Add(removeButton,pos=(i,2),flag=wx.ALIGN_RIGHT|wx.TOP,border=5)
                else:
                    and_or_box = wx.ComboBox(parent=self.current_tab,value=self.current_search[i],choices=['and','or'],style=wx.CB_READONLY,size=(60,-1),id=(i-1)/2)
                    and_or_box.Bind(wx.EVT_COMBOBOX,self.and_or_search_item)
                    sizer.Add(and_or_box,pos=(i,0),flag=wx.ALIGN_LEFT|wx.TOP,border=5)

            self.current_tab.EnableScrolling(x_scrolling=True,y_scrolling=True)
            self.current_tab.SetScrollbars(20,20,10,10)

        self.current_tab.Fit()
项目:magic-card-database    作者:drknotter    | 项目源码 | 文件源码
def update_current_search_tab(self):

        sizer = self.current_sizer
        sizer.Clear(True)
        sizer.RemoveGrowableRow(0)
        sizer.RemoveGrowableRow(1)
        sizer.RemoveGrowableCol(0)
        sizer.RemoveGrowableCol(2)

        if( len(self.current_search) == 0 ):

            sizer.AddGrowableRow(0)
            sizer.AddGrowableCol(0)
            sizer.Add(wx.StaticText(parent=self.current_tab,label="There are no search items."),flag=wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL,pos=(0,0))

        else:

            sizer.AddGrowableCol(2)

            for i in range(len(self.current_search)):
                if i%2 == 0:
                    not_box = wx.ComboBox(parent=self.current_tab,value=self.current_search[i][0],choices=['','not'],style=wx.CB_READONLY,size=(60,-1),id=i/2)
                    not_box.Bind(wx.EVT_COMBOBOX,self.not_search_item)
                    sizer.Add(not_box,pos=(i,0),flag=wx.ALIGN_LEFT|wx.TOP,border=5)

                    key = self.current_search[i][1]
                    value = self.current_search[i][2]
                    sizer.Add(wx.StaticText(parent=self.current_tab,label=key+" = '"+value+"'"),pos=(i,1),flag=wx.TOP|wx.LEFT|wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL,border=5)

                    removeButton = wx.Button(self.current_tab,label='Remove',id=i/2)
                    removeButton.Bind(wx.EVT_BUTTON,self.remove_search_item)
                    sizer.Add(removeButton,pos=(i,2),flag=wx.ALIGN_RIGHT|wx.TOP,border=5)
                else:
                    and_or_box = wx.ComboBox(parent=self.current_tab,value=self.current_search[i],choices=['and','or'],style=wx.CB_READONLY,size=(60,-1),id=(i-1)/2)
                    and_or_box.Bind(wx.EVT_COMBOBOX,self.and_or_search_item)
                    sizer.Add(and_or_box,pos=(i,0),flag=wx.ALIGN_LEFT|wx.TOP,border=5)

            self.current_tab.EnableScrolling(x_scrolling=True,y_scrolling=True)
            self.current_tab.SetScrollbars(20,20,10,10)

        self.current_tab.Fit()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: working_days.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX
        wx.Frame.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Year")
        self.combo_box_1 = wx.ComboBox(self, -1, choices=[ ], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.label_5 = wx.StaticText(self, -1, "Total Working Days")
        self.label_2 = wx.StaticText(self, -1, " Term I")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.label_3 = wx.StaticText(self, -1, "Term II")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
        self.label_4 = wx.StaticText(self, -1, "Final")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "Save")
        self.button_2.Enabled=False

        self.combo_box_1.SetSelection(0)
        self.DB=db_operations()

        self.__set_properties()
        self.__do_layout()
        self.YEAR='Select'

        self.Bind(wx.EVT_COMBOBOX, self.OnCombo, self.combo_box_1)
        self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2)

        self.load_year()
        self.OnLoad()

        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Login.__init__
        kwds["style"] = wx.ICONIZE | wx.CAPTION | wx.MINIMIZE | wx.CLOSE_BOX | wx.MINIMIZE_BOX
        wx.Frame.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Username")
        self.combo_box_1 = wx.ComboBox(self, -1, choices=["Select", "admin", "teacher"], style=wx.CB_DROPDOWN)
        self.label_2 = wx.StaticText(self, -1, "Password")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_TAB | wx.TE_PASSWORD)
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "Login")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.OnCombo_Change, self.combo_box_1)
        self.Bind(wx.EVT_BUTTON, self.OnCancel_Click, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnLogin_Click, self.button_2)  

        self.Bind(wx.EVT_TEXT,self.OnText_Change,self.text_ctrl_1)

        #self.Bind(wx.EVT_KEY_DOWN,self.OnKeyPress,self.text_ctrl_1)
        self.Bind(wx.EVT_CLOSE,self.on_close,self)
        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress)
        self.UO=user_operations(self)
        # DB Connection obj



        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: delete.__init__
        kwds["style"] = wx.MAXIMIZE | wx.CLOSE_BOX | wx.THICK_FRAME|wx.CAPTION
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
        self.label_1 = wx.StaticText(self.panel_2, -1, "Specify Class")
        self.combo_box_1 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY )
        self.combo_box_2 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_READONLY )
        self.combo_box_3 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_READONLY )
        self.static_line_2 = wx.StaticLine(self.panel_2, -1)
        self.panel_1 = wx.Panel(self.panel_2, -1)

        self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30,30), ['Admission No                       Name'])
        self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, [])
        self.button_close = wx.Button(self.panel_2, -1, "Close")
        self.button_proceed = wx.Button(self.panel_2, -1, "Proceed")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div, self.combo_box_3)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2)
        self.Bind(wx.EVT_BUTTON, self.on_close, self.button_close)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)

        self.checkedItems=()
        self.DB=db_operations()
        self.load_year()
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: working_days.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX 
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Year")
        self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.label_5 = wx.StaticText(self, -1, "Total Working Days")
        self.label_2 = wx.StaticText(self, -1, " Term I")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.label_3 = wx.StaticText(self, -1, "Term II")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
        self.label_4 = wx.StaticText(self, -1, "Final")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
        self.button_1 = wx.Button(self, -1, "Close")
        self.button_2 = wx.Button(self, -1, "Save")
        self.button_2.Enabled=False

        self.combo_box_1.SetSelection(0)
        self.DB=db_operations()
        self.load_year()

        self.__set_properties()
        self.__do_layout()
        self.YEAR='Select'

        self.Bind(wx.EVT_COMBOBOX, self.OnCombo, self.combo_box_1)
        self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2)

        self.OnLoad()

        self.Bind(wx.EVT_CLOSE, self.OnClose)

        # end wxGlade
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def widgetMaker(self, widget, objects):
        """"""
        for obj in objects:
            widget.Append(obj.make, obj)
        widget.Bind(wx.EVT_COMBOBOX, self.onSelect)
项目:kicad_mmccoo    作者:mmccoo    | 项目源码 | 文件源码
def __init__(self, parent, board):
        wx.Frame.__init__(self, parent, title="this is the title")
        self.panel = wx.Panel(self) 
        label = wx.StaticText(self.panel, label = "Hello World")
        button = wx.Button(self.panel, label="Button label", id=1)

        nets = board.GetNetsByName()
        self.netnames = []
        for netname, net in nets.items():
            if (str(netname) == ""):
                continue
            self.netnames.append(str(netname))

        netcb = wx.ComboBox(self.panel, choices=self.netnames)
        netcb.SetSelection(0)

        netsbox = wx.BoxSizer(wx.HORIZONTAL)
        netsbox.Add(wx.StaticText(self.panel, label="Nets:"))
        netsbox.Add(netcb, proportion=1)

        modules = board.GetModules()
        self.modulenames = []
        for mod in modules:
            self.modulenames.append("{}({})".format(mod.GetReference(), mod.GetValue()))
        modcb = wx.ComboBox(self.panel, choices=self.modulenames)
        modcb.SetSelection(0)

        modsbox = wx.BoxSizer(wx.HORIZONTAL)
        modsbox.Add(wx.StaticText(self.panel, label="Modules:"))
        modsbox.Add(modcb, proportion=1)

        box = wx.BoxSizer(wx.VERTICAL)
        box.Add(label,   proportion=0)
        box.Add(button,  proportion=0)
        box.Add(netsbox, proportion=0)
        box.Add(modsbox, proportion=0)

        self.panel.SetSizer(box)
        self.Bind(wx.EVT_BUTTON, self.OnPress, id=1)
        self.Bind(wx.EVT_COMBOBOX, self.OnSelectNet, id=netcb.GetId())
        self.Bind(wx.EVT_COMBOBOX, self.OnSelectMod, id=modcb.GetId())
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def OnEvent(self, propgrid, property, ctrl, event):
        if isinstance(event, wx.CommandEvent):
            if event.GetEventType() == wx.EVT_COMBOBOX:
                print 'COMBAO DA MASSA\n\n\n'
            if event.GetString():
                print 'VALUE:', event.GetString(), '\n'
                return True
        return False
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def bind(self, handler, id):
        self._uiobj.Bind(wx.EVT_COMBOBOX, handler, id=id)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initSigControls(self):
        """Initialize signal controls.
        """
        sigSizer = wx.BoxSizer(orient=wx.VERTICAL)

        waveformControlBox = widgets.ControlBox(self, label='Waveform', orient=wx.VERTICAL)

        self.waveformComboBox = wx.ComboBox(self, id=wx.ID_ANY, choices=list(waveforms.keys()),
            value='sinusoid', style=wx.CB_SORT | wx.CB_READONLY)
        self.waveformComboBox.Bind(wx.EVT_COMBOBOX, self.setWaveform)

        waveformControlBox.Add(self.waveformComboBox, proportion=0, flag=wx.ALL, border=10)

        sigSizer.Add(waveformControlBox, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)

        freqControlBox = widgets.ControlBox(self, label='Base Frequency', orient=wx.HORIZONTAL)

        self.freqText = wx.StaticText(self, label='%4.1f(Hz)' % 1.0)
        freqTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        freqTextSizer.Add(self.freqText, proportion=1, flag=wx.EXPAND)
        self.freqSlider = wx.Slider(self, style=wx.SL_HORIZONTAL, value=10, minValue=1, maxValue=300)
        self.Bind(wx.EVT_SLIDER, self.setFreq, self.freqSlider)

        freqControlBox.Add(freqTextSizer, proportion=0, flag=wx.ALL, border=10)
        freqControlBox.Add(self.freqSlider, proportion=1, flag=wx.ALL | wx.EXPAND, border=10)

        sigSizer.Add(freqControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        mixControlBox = widgets.ControlBox(self, label='Channel Mixer', orient=wx.HORIZONTAL)

        self.mixNoneButton = wx.RadioButton(self, label='None', style=wx.RB_GROUP)
        #mixControlBox.Add(self.mixNoneButton, proportion=0, flag=wx.TOP | wx.LEFT | wx.BOTTOM, border=10)
        mixControlBox.Add(self.mixNoneButton, proportion=0, flag=wx.ALL, border=10)
        self.mixNoneButton.SetValue(True)
        self.Bind(wx.EVT_RADIOBUTTON, self.setMixNone, self.mixNoneButton)

        #self.mixEqualButton = wx.RadioButton(self, label='Equal')
        #mixControlBox.Add(self.mixEqualButton, proportion=0, flag=wx.ALL, border=10)
        #self.Bind(wx.EVT_RADIOBUTTON, self.setMixEqual, self.mixEqualButton)

        self.mixRandomButton = wx.RadioButton(self, label='Random')
        #mixControlBox.Add(self.mixRandomButton, proportion=0, flag=wx.BOTTOM | wx.RIGHT | wx.TOP, border=10)
        mixControlBox.Add(self.mixRandomButton, proportion=0, flag=wx.ALL, border=10)
        self.Bind(wx.EVT_RADIOBUTTON, self.setMixRandom, self.mixRandomButton)

        sigSizer.Add(mixControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(sigSizer)
项目:JincinExamHelper    作者:Qinet    | 项目源码 | 文件源码
def __init__(self, parent=None):
        super(WebPanel, self).__init__(parent=parent)
        self.current_url = HOMEURL
        sizer = wx.BoxSizer(orient=wx.VERTICAL)
        btn_sizer = wx.BoxSizer(orient=wx.HORIZONTAL)
        self.web_view = webview.WebView.New(parent=self)
        self.Bind(event=webview.EVT_WEBVIEW_LOADED, handler=self.webview_loaded, source=self.web_view)
        self.Bind(event=webview.EVT_WEBVIEW_NEWWINDOW, handler=self.open_new_window, source=self.web_view)

        btn_home = wx.Button(parent=self, label=u"??", style=wx.BU_EXACTFIT)
        self.Bind(event=wx.EVT_BUTTON, handler=self.click_home_button, source=btn_home)
        btn_sizer.Add(item=btn_home, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        btn_back_page = wx.Button(parent=self, label=u"<--", style=wx.BU_EXACTFIT)
        self.Bind(event=wx.EVT_BUTTON, handler=self.click_preview_page_button, source=btn_back_page)
        self.Bind(event=wx.EVT_UPDATE_UI, handler=self.check_can_goback, source=btn_back_page)
        btn_sizer.Add(item=btn_back_page, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        btn_next_page = wx.Button(parent=self, label=u"-->", style=wx.BU_EXACTFIT)
        self.Bind(event=wx.EVT_BUTTON, handler=self.click_next_page_button, source=btn_next_page)
        self.Bind(event=wx.EVT_UPDATE_UI, handler=self.check_can_goforward, source=btn_next_page)
        btn_sizer.Add(item=btn_next_page, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        btn_stop = wx.Button(parent=self, label=u"??", style=wx.BU_EXACTFIT)
        self.Bind(event=wx.EVT_BUTTON, handler=self.click_stop_button, source=btn_stop)
        btn_sizer.Add(item=btn_stop, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        btn_refresh = wx.Button(parent=self, label=u"??", style=wx.BU_EXACTFIT)
        self.Bind(event=wx.EVT_BUTTON, handler=self.click_refresh_page_button, source=btn_refresh)
        btn_sizer.Add(btn_refresh, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        url_bar_title = wx.StaticText(parent=self, label=u"??:")
        btn_sizer.Add(url_bar_title, proportion=CAN_NOT_CHANGE, flag=wx.CENTER | wx.ALL, border=2)

        self.location = wx.ComboBox(parent=self, value=wx.EmptyString, style=wx.CB_DROPDOWN | wx.TE_PROCESS_ENTER)
        self.location.Bind(event=wx.EVT_TEXT_ENTER, handler=self.enter_location)
        self.Bind(event=wx.EVT_COMBOBOX, handler=self.select_location, source=self.location)
        btn_sizer.Add(item=self.location, proportion=CAN_CHANGE, flag=wx.EXPAND | wx.ALL, border=2)

        sizer.Add(item=btn_sizer, proportion=CAN_NOT_CHANGE, flag=wx.EXPAND)
        sizer.Add(item=self.web_view, proportion=CAN_CHANGE, flag=wx.EXPAND)
        self.SetSizer(sizer=sizer)

        self.web_view.LoadURL(url=self.current_url)
项目:pyDataView    作者:edwardsmith999    | 项目源码 | 文件源码
def set_bindings(self):

        self.Bind(wx.EVT_RADIOBOX, self.handle_plottype, 
                  self.choosep.plottype_p.fieldradiobox)
        self.Bind(wx.EVT_RADIOBOX, self.handle_fieldtype, 
                  self.choosep.fieldtype_p.fieldradiobox)
        self.Bind(wx.EVT_COMBOBOX, self.handle_component, 
                  self.choosep.component_p.componentcombobox)
        self.Bind(wx.EVT_COMBOBOX, self.handle_normal, 
                  self.choosep.component_p.normalcombobox)

        self.Bind(wx.EVT_COMMAND_SCROLL_THUMBTRACK, self.handle_recslider, 
                  self.slidersp.recslider.slider)
        self.Bind(wx.EVT_COMMAND_SCROLL_THUMBTRACK, self.handle_binslider, 
                  self.slidersp.binslider.slider)
        self.Bind(wx.EVT_COMMAND_SCROLL_CHANGED, self.handle_recslider, 
                  self.slidersp.recslider.slider)
        self.Bind(wx.EVT_COMMAND_SCROLL_CHANGED, self.handle_binslider, 
                  self.slidersp.binslider.slider)
        self.Bind(wx.EVT_TEXT_ENTER, self.handle_rectxt,
                  self.slidersp.recslider.slidertext)
        self.Bind(wx.EVT_TEXT_ENTER, self.handle_bintxt,
                  self.slidersp.binslider.slidertext)

        self.Bind(wx.EVT_SPINCTRL, self.handle_recspin,
                  self.slidersp.recslider.spin)
        self.Bind(wx.EVT_SPINCTRL, self.handle_binspin,
                  self.slidersp.binslider.spin)

        self.Bind(wx.EVT_CHECKBOX, self.handle_autoscale, 
                  self.choosep.autoscale_b) 
        self.Bind(wx.EVT_TEXT_ENTER, self.handle_minscale, 
                  self.choosep.minpspin) 
        self.Bind(wx.EVT_TEXT_ENTER, self.handle_maxscale, 
                  self.choosep.maxpspin) 

        self.choosep.save_b.Bind(wx.EVT_BUTTON, 
                                 lambda event: self.save_dialogue(event, 'fig.png'))
        self.choosep.save_d.Bind(wx.EVT_BUTTON, 
                                 lambda event: self.save_dialogue(event, 'data.csv'))
        self.choosep.save_s.Bind(wx.EVT_BUTTON, 
                                 lambda event: self.save_dialogue(event, 'script.py'))
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, pou_type=None, type_readonly=False):
        wx.Dialog.__init__(self, id=-1, parent=parent,
                           name='PouDialog', title=_('Create a new POU'),
                           style=wx.DEFAULT_DIALOG_STYLE)

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=15)
        infos_sizer.AddGrowableCol(1)
        main_sizer.AddSizer(infos_sizer, border=20,
                            flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)

        pouname_label = wx.StaticText(self, label=_('POU Name:'))
        infos_sizer.AddWindow(pouname_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.PouName = wx.TextCtrl(self)
        infos_sizer.AddWindow(self.PouName, flag=wx.GROW)

        poutype_label = wx.StaticText(self, label=_('POU Type:'))
        infos_sizer.AddWindow(poutype_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.PouType = wx.ComboBox(self, style=wx.CB_READONLY)
        self.Bind(wx.EVT_COMBOBOX, self.OnTypeChanged, self.PouType)
        infos_sizer.AddWindow(self.PouType, flag=wx.GROW)

        language_label = wx.StaticText(self, label=_('Language:'))
        infos_sizer.AddWindow(language_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
        infos_sizer.AddWindow(self.Language, flag=wx.GROW)

        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
        main_sizer.AddSizer(button_sizer, border=20,
                            flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.SetSizer(main_sizer)

        for option in GetPouTypes():
            if not type_readonly or _(option) == _(pou_type):
                self.PouType.Append(_(option))
        if pou_type is not None:
            self.PouType.SetStringSelection(_(pou_type))
        self.RefreshLanguage()
        self.Fit()
        self.PouNames = []
        self.PouElementNames = []
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, folder, filter=None, editable=True):
        wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL)

        main_sizer = wx.BoxSizer(wx.VERTICAL)

        self.Tree = wx.TreeCtrl(self,
                                style=(wx.TR_HAS_BUTTONS |
                                       wx.TR_SINGLE |
                                       wx.SUNKEN_BORDER |
                                       wx.TR_HIDE_ROOT |
                                       wx.TR_LINES_AT_ROOT |
                                       wx.TR_EDIT_LABELS))
        if wx.Platform == '__WXMSW__':
            self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnTreeItemExpanded, self.Tree)
            self.Tree.Bind(wx.EVT_LEFT_DOWN, self.OnTreeLeftDown)
        else:
            self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnTreeItemExpanded, self.Tree)
        self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnTreeItemCollapsed, self.Tree)
        self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnTreeBeginLabelEdit, self.Tree)
        self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnTreeEndLabelEdit, self.Tree)
        main_sizer.AddWindow(self.Tree, 1, flag=wx.GROW)

        if filter is not None:
            self.Filter = wx.ComboBox(self, style=wx.CB_READONLY)
            self.Bind(wx.EVT_COMBOBOX, self.OnFilterChanged, self.Filter)
            main_sizer.AddWindow(self.Filter, flag=wx.GROW)
        else:
            self.Filter = None

        self.SetSizer(main_sizer)

        self.Folder = folder
        self.Editable = editable

        self.TreeImageList = wx.ImageList(16, 16)
        self.TreeImageDict = {}
        for item_type, bitmap in [(DRIVE, "tree_drive"),
                                  (FOLDER, "tree_folder"),
                                  (FILE, "tree_file")]:
            self.TreeImageDict[item_type] = self.TreeImageList.Add(GetBitmap(bitmap))
        self.Tree.SetImageList(self.TreeImageList)

        self.Filters = {}
        if self.Filter is not None:
            filter_parts = filter.split("|")
            for idx in xrange(0, len(filter_parts), 2):
                if filter_parts[idx + 1] == "*.*":
                    self.Filters[filter_parts[idx]] = ""
                else:
                    self.Filters[filter_parts[idx]] = filter_parts[idx + 1].replace("*", "")
                self.Filter.Append(filter_parts[idx])
                if idx == 0:
                    self.Filter.SetStringSelection(filter_parts[idx])

            self.CurrentFilter = self.Filters[self.Filter.GetStringSelection()]
        else:
            self.CurrentFilter = ""
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # Constructor



        kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX
        wx.Frame.__init__(self, *args, **kwds)
        try:

            self.Parent.Hide()


        except:
            print "Error Closing Prent"

        self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)
        self.combo_box_1 = wx.ComboBox(self, -1, choices=[ ], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY | wx.CB_SORT)


        self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)

        self.combo_box_2 = wx.ComboBox(self, -1, choices=[  'Select',"8", "9", "10"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        self.label_3 = wx.StaticText(self, -1, "Div", style=wx.ALIGN_CENTRE)
        self.combo_box_3 = wx.ComboBox(self, -1, choices=[ 'Select',], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY | wx.CB_SORT)
        self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE)


        self.combo_box_4 = wx.ComboBox(self, -1, choices=[ 'Select', "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)


        self.button_1 = wx.Button(self, -1, "Close")
        self.button_2 = wx.Button(self, -1, "Go")

        #self.SetMenu()

        self.__set_properties()
        self.__do_layout()
        self.IsGridChild=0

        self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3)

        self.Bind(wx.EVT_BUTTON, self.Go_Clicked, self.button_2)
        self.Bind(wx.EVT_BUTTON, self.Cancel_Clicked, self.button_1)
        self.Bind(wx.EVT_CLOSE, self.OnClose)
        self.GridFrame = None

        self.YEAR=''
        #self.CalcSheet=SpreadSheet(self)

        self.DB=db_operations()
        self.load_year()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: consolidated_report.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX  | wx.FRAME_FLOAT_ON_PARENT 
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, -1)
        self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_2 = wx.ComboBox(self.panel_1, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_3 = wx.ComboBox(self.panel_1, -1, choices=["Select Division"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_4 = wx.ComboBox(self.panel_1, -1, choices=["Select Term","Term1","Term2","Annual"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.label_1 = wx.StaticText(self.panel_1, -1, "Select What to Include")
        self.checkbox_1 = wx.CheckBox(self.panel_1, -1, "CE")
        self.checkbox_2 = wx.CheckBox(self.panel_1, -1, "TE")
        self.checkbox_3 = wx.CheckBox(self.panel_1, -1, "Total")
        self.checkbox_4 = wx.CheckBox(self.panel_1, -1, "Grade")
        self.checkbox_5 = wx.CheckBox(self.panel_1, -1, "CE Total")
        self.checkbox_6 = wx.CheckBox(self.panel_1, -1, "TE Total")
        self.checkbox_7 = wx.CheckBox(self.panel_1, -1, "Grand Total")

        allLoc = ['Select All']
        list2=['I Language','Malayalam','English','Hindi','S.S','Physics','Biology','Chemistry','Maths','IT']
        self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30,30), allLoc)
        self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, list2)
        self.button_1 = wx.Button(self.panel_1, -1, "Close")
        self.button_2 = wx.Button(self.panel_1, -1, "Proceed")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div, self.combo_box_3)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_term, self.combo_box_4)

        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2)
        self.Bind(wx.EVT_BUTTON, self.on_close, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_2)

        self.Bind(wx.EVT_CHECKBOX, self.on_check_ce, self.checkbox_1)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_te, self.checkbox_2)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_tota, self.checkbox_3)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_grade, self.checkbox_4)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_ce_total, self.checkbox_5)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_te_total, self.checkbox_6)
        self.Bind(wx.EVT_CHECKBOX, self.on_check_grand, self.checkbox_7)
        self.checkedItems=()
        self.checkedItems_2=[0,1,2,3]
        self.DB=db_operations()

        self.Selected_Index=[]
        self.YEAR=''
        self.CLASS=''
        self.DIV=''
        self.TERM=''

        self.load_year()
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # Constructor

        kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)


        self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)
        self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)


        self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)

        self.combo_box_2 = wx.ComboBox(self, -1, choices=[ 'All',"8", "9"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        #self.label_3 = wx.StaticText(self, -1, "Division", style=wx.ALIGN_CENTRE)
        #self.combo_box_3 = wx.ComboBox(self, -1, choices=['All'], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        #self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE)
        #self.button_3 = wx.Button(self, -1, "Import File")

        #self.combo_box_4 = wx.ComboBox(self, -1, choices=[ "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)


        self.button_2 = wx.Button(self, -1, "Proceed")
        self.button_1 = wx.Button(self, -1, "Close")


        #self.SetMenu()

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2)
        #self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3)

        self.Bind(wx.EVT_BUTTON, self.ok_clicked, self.button_2)
        self.Bind(wx.EVT_BUTTON,self.on_close, self.button_1)

        #self.CalcSheet=SpreadSheet(self)
        self.YEAR=''
        self.DIVS=[]
        self.DB=db_operations()
        self.load_year()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: promote.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
        self.label_10 = wx.StaticText(self.panel_2, -1, "Current Class Details")
        self.combo_box_1 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_2 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_3 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.static_line_1 = wx.StaticLine(self.panel_2, -1, style=wx.LI_VERTICAL)
        self.label_11 = wx.StaticText(self.panel_2, -1, "Promote/Move To")
        self.combo_box_4 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_5 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_6 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.static_line_2 = wx.StaticLine(self.panel_2, -1)
        self.panel_1 = wx.Panel(self.panel_2, -1)
        allLoc = ['Admission No                       Name']
        self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30,30), allLoc)
        self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, [])

        #self.list_box_2 = wx.ListBox(self.panel_1, -1, choices=[])
        #self.list_box_3 = wx.ListBox(self.panel_1, -1, choices=[])

        self.button_cancel = wx.Button(self.panel_2, -1, "Close")
        self.button_proceed = wx.Button(self.panel_2, -1, "Proceed")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year1, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class1, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div1, self.combo_box_3)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year2, self.combo_box_4)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class2, self.combo_box_5)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div2, self.combo_box_6)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_cancel)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.checkedItems=()
        self.DB=db_operations()
        self.load_year(self.combo_box_1 ,self.combo_box_2 ,self.combo_box_3 )
        self.load_year(self.combo_box_4 ,self.combo_box_5 ,self.combo_box_6 )
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # Constructor

        kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)


        self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)
        self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)


        self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE)

        self.combo_box_2 = wx.ComboBox(self, -1, choices=[ 'Select',"8", "9", "10"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        self.label_3 = wx.StaticText(self, -1, "Division", style=wx.ALIGN_CENTRE)
        self.combo_box_3 = wx.ComboBox(self, -1, choices=['Select'], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        #self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE)
        #self.button_3 = wx.Button(self, -1, "Import File")

        #self.combo_box_4 = wx.ComboBox(self, -1, choices=[ "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)


        self.button_2 = wx.Button(self, -1, "Import")
        self.button_1 = wx.Button(self, -1, "Close")


        #self.SetMenu()

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3)

        self.Bind(wx.EVT_BUTTON, self.ok_clicked, self.button_2)
        self.Bind(wx.EVT_BUTTON, self.cancel_clicked, self.button_1)
        self.Bind(wx.EVT_CLOSE, self.on_close)

        #self.CalcSheet=SpreadSheet(self)
        self.YEAR=''
        self.DB=db_operations()
        self.load_year()
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initToolbar(self):
        self.toolbar = aui.AuiToolBar(self)

        self.startButton = wx.Button(self.toolbar, label='Start')
        self.toolbar.AddControl(self.startButton, label='Run')
        self.Bind(wx.EVT_BUTTON, self.toggleRunning, self.startButton)

        self.subjectTextCtrl = wx.TextCtrl(self.toolbar)
        self.subjectTextCtrl.SetValue('s')
        self.toolbar.AddControl(self.subjectTextCtrl, label='Subject')

        self.protocolComboBox = wx.ComboBox(self.toolbar, choices=self.protocols,
                value=self.protocol, style=wx.CB_READONLY)
        self.toolbar.AddControl(self.protocolComboBox, label='Protocol')
        self.Bind(wx.EVT_COMBOBOX, self.setProtocolFromComboBox, self.protocolComboBox)

        #self.toolbar.Realize()