Python wx 模块,CB_READONLY 实例源码

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

项目: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
项目: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)
项目: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()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title=_('Create a new action'))

        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)

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

        self.ActionName = wx.TextCtrl(self, size=wx.Size(180, -1))
        infos_sizer.AddWindow(self.ActionName, 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 GetActionLanguages():
            self.Language.Append(_(option))

        self.Fit()
        self.PouNames = []
        self.PouElementNames = []
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title=_('Create a new transition'))

        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=10)
        infos_sizer.AddGrowableCol(1)
        main_sizer.AddSizer(infos_sizer, border=20,
                            flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)

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

        self.TransitionName = wx.TextCtrl(self, size=wx.Size(180, -1))
        infos_sizer.AddWindow(self.TransitionName, 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)

        self.SetSizer(main_sizer)

        for language in GetTransitionLanguages():
            self.Language.Append(_(language))

        self.Fit()
        self.PouNames = []
        self.PouElementNames = []
项目: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: 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: chng_pass.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_3 = wx.StaticText(self, -1, "Username")
        self.combo_box_1 = wx.ComboBox(self, -1, choices=['Select','admin','teacher'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.label_4 = wx.StaticText(self, -1, "Current Password")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        self.label_5 = wx.StaticText(self, -1, "New Password")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        self.label_6 = wx.StaticText(self, -1, "Confirm New Password")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "Save")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_combo, self.combo_box_1)
        self.Bind(wx.EVT_TEXT, self.on_password_1, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT, self.on_password_2, self.text_ctrl_2)
        self.Bind(wx.EVT_TEXT, self.on_password_3, self.text_ctrl_3)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.on_save, self.button_2)
        self.UO=user_operations(self)
        # 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
项目: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)
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, datatypes, infos):
        wx.Dialog.__init__(self, parent, title=_('Edit array type properties'))

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

        top_sizer = wx.BoxSizer(wx.HORIZONTAL)
        main_sizer.AddSizer(top_sizer, border=20,
                            flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)

        basetype_label = wx.StaticText(self, label=_('Base Type:'))
        top_sizer.AddWindow(basetype_label, 1, flag=wx.ALIGN_BOTTOM)

        self.BaseType = wx.ComboBox(self, style=wx.CB_READONLY)
        top_sizer.AddWindow(self.BaseType, 1, flag=wx.GROW)

        self.Dimensions = CustomEditableListBox(self, label=_("Dimensions:"),
                                                style=(wx.gizmos.EL_ALLOW_NEW |
                                                       wx.gizmos.EL_ALLOW_EDIT |
                                                       wx.gizmos.EL_ALLOW_DELETE))
        for func in ["_OnLabelEndEdit",
                     "_OnAddButton",
                     "_OnDelButton",
                     "_OnUpButton",
                     "_OnDownButton"]:
            setattr(self.Dimensions, func, self.OnDimensionsChanged)
        main_sizer.AddSizer(self.Dimensions, border=20,
                            flag=wx.GROW | wx.LEFT | wx.RIGHT)

        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 datatype in datatypes:
            self.BaseType.Append(datatype)

        if isinstance(infos, TupleType) and infos[0] == "array":
            self.BaseType.SetStringSelection(infos[1])
            self.Dimensions.SetStrings(map(lambda x: "..".join(x), infos[2]))
        elif infos in datatypes:
            self.BaseType.SetStringSelection(infos)

        self.BaseType.SetFocus()
        self.Fit()
项目: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):
        # 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()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: add_div.__init__

        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
        self.label_1 = wx.StaticText(self.panel_1, -1, "YEAR")


        self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT)
        self.label_2 = wx.StaticText(self.panel_1, -1, "CLASS")
        self.combo_box_2 = wx.ComboBox(self.panel_1, -1, choices=["Select","8","9","10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT)
        self.sizer_4_staticbox = wx.StaticBox(self.panel_1, -1, "Specify Class ")
        self.list_box_1 = wx.ListBox(self.panel_1, -1, choices=[], style=wx.LB_SINGLE | wx.LB_SORT)
        self.button_1 = wx.Button(self.panel_1, -1, "Remove Divison")
        self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "")
        self.button_2 = wx.Button(self.panel_1, -1, "Add Division")
        self.sizer_9_staticbox = wx.StaticBox(self.panel_1, -1, "New Division")
        self.button_3 = wx.Button(self.panel_1, -1, "Close")
        self.hyperlink_1 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "Add Academic Year")


        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_LISTBOX, self.on_list, self.list_box_1)
        self.Bind(wx.EVT_BUTTON, self.on_remove, self.button_1)
        self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1)

        self.Bind(wx.EVT_BUTTON, self.on_add, self.button_2)
        self.Bind(wx.EVT_BUTTON, self.on_close, self.button_3)

        self.text_ctrl_1 .Bind(wx.EVT_SET_FOCUS,self.onfocus)
        self.text_ctrl_1 .Bind(wx.EVT_KILL_FOCUS,self.offocus)
        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.on_keypress)

        self.Bind(wx.EVT_HYPERLINK, self.on_hlink, self.hyperlink_1)

        self.YEAR=''
        self.CLASS=''

        self.DB=db_operations()
        self.load_year()

        # end wxGlade
项目: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()