Python wx 模块,EVT_CHECKLISTBOX 实例源码

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

项目:PancakeViewer    作者:forensicmatt    | 项目源码 | 文件源码
def _InitCheckboxes(self):
        option_strings = [
            'Append inode'
        ]
        self.checklistbox_options.InsertItems(option_strings,0)
        self.Bind(wx.EVT_LISTBOX, self.EvtListBox, self.checklistbox_options)
        self.Bind(wx.EVT_CHECKLISTBOX, self.EvtCheckListBox, self.checklistbox_options)
项目: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
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def bind(self, handler, id):
        self._uiobj.Bind(wx.EVT_CHECKLISTBOX, handler, id=id)
项目: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):
        # 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