我们从Python开源项目中,提取了以下33个代码示例,用于说明如何使用wx.EVT_TEXT。
def __init__(self, parent): # begin wxGlade: CE_TE.__init__ #kwds["style"] = wx.CLOSE_BOX|wx.MINIMIZE_BOX wx.Dialog.__init__(self, parent,id=-1,title="CE and TE") self.parent=parent self.label_1 = wx.StaticText(self, -1, "Max_CE") self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.label_2 = wx.StaticText(self, -1, "Max_TE") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "OK") self.button_2 = wx.Button(self, -1, "Cancel") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT_ENTER, self.On_TE_Enter, self.text_ctrl_1) self.Bind(wx.EVT_TEXT, self.On_CE_Text, self.text_ctrl_1) self.Bind(wx.EVT_TEXT_ENTER, self.On_TE_Enter, self.text_ctrl_2) self.Bind(wx.EVT_TEXT, self.On_TE_Text, self.text_ctrl_2) self.Bind(wx.EVT_BUTTON, self.On_Ok, self.button_1) self.Bind(wx.EVT_BUTTON, self.On_Cancel, self.button_2) # end wxGlade
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
def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ #args[ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.text_ctrl_passwd = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel")) self.button_ok = wx.Button(self, wx.ID_ANY, _("OK")) self.__set_properties() self.__do_layout() self.password_text='' self.Bind(wx.EVT_TEXT, self.on_passwod, self.text_ctrl_passwd) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_button_ok, self.button_ok) self.cancelled=False # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: add_academic_year.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.label_3 = wx.StaticText(self, wx.ID_ANY, ("Academic Year")) self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "") self.label_4 = wx.StaticText(self, wx.ID_ANY, ("-")) self.text_ctrl_2 = wx.TextCtrl(self, wx.ID_ANY, "") self.button_close = wx.Button(self, wx.ID_ANY, ("Close")) self.button_add = wx.Button(self, wx.ID_ANY, ("Add")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_enter, self.text_ctrl_1) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_close) self.Bind(wx.EVT_BUTTON, self.on_add, self.button_add) self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.handle_keypress) self.NEW_YEAR='' # end wxGlade
def create_spin(**kwargs): panel = kwargs.get('panel') value = kwargs.get('value') key = kwargs.get('key') bind = kwargs.get('bind') gui = kwargs.get('gui') item_sizer = wx.BoxSizer(wx.HORIZONTAL) item_name = MODULE_KEY.join(key) style = wx.ALIGN_LEFT item_box = wx.SpinCtrl(panel, id=id_renew(item_name, update=True), min=gui['min'], max=gui['max'], initial=int(value), style=style) item_text = wx.StaticText(panel, label=translate_key(item_name)) item_box.Bind(wx.EVT_SPINCTRL, bind) item_box.Bind(wx.EVT_TEXT, bind) item_sizer.Add(item_text, 0, wx.ALIGN_CENTER) item_sizer.Add(item_box) return {'item': item_sizer, 'text_size': item_text.GetSize()[0], 'text_ctrl': item_text}
def clear_textbox(self, event): self.username_textbox.SetValue("") self.Unbind(wx.EVT_TEXT, self.username_textbox) event.Skip()
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)
def initCopy(self): copySizer = wx.BoxSizer(orient=wx.HORIZONTAL) copyControlBox = widgets.ControlBox(self, label='Copy Text', orient=wx.VERTICAL) self.copyTextCtrl = wx.TextCtrl(self) self.Bind(wx.EVT_TEXT, self.setCopyText, self.copyTextCtrl) self.offlineControls += [self.copyTextCtrl] copyControlBox.Add(self.copyTextCtrl, proportion=1, flag=wx.ALL | wx.EXPAND, border=10) copySizer.Add(copyControlBox, proportion=1, flag =wx.ALL | wx.EXPAND, border=10) self.sizer.Add(copySizer, proportion=0, flag=wx.EXPAND)
def initDeviceControls(self): deviceControlBox = widgets.ControlBox(self, label='Device Path', orient=wx.HORIZONTAL) self.deviceTextCtrl = wx.TextCtrl(self, value=self.src.getDeviceName()) self.Bind(wx.EVT_TEXT, self.setDeviceName, self.deviceTextCtrl) deviceControlBox.Add(self.deviceTextCtrl, proportion=1, flag=wx.ALL | wx.EXPAND, border=10) self.sizer.Add(deviceControlBox, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)
def __init__(self, parent, name, init, stextwidth): def OnEdit(event): text = event.GetString() point = self.value.GetInsertionPoint() if (IsNumber(self.value.GetValue()) == False): self.value.SetBackgroundColour( "Pink" ) self.value.SetForegroundColour( "Black" ) else: self.value.SetBackgroundColour(wx.NullColour) self.value.SetForegroundColour(wx.NullColour) self.value.ChangeValue(text) self.value.SetInsertionPoint(point) fontpointsize=wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT).GetPointSize() self.font = wx.Font(fontpointsize, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) wx.BoxSizer.__init__(self, wx.HORIZONTAL) dc = wx.ScreenDC() dc.SetFont(self.font) textw,texth = dc.GetTextExtent(name) if textw > stextwidth: labelw = textw else: labelw = stextwidth self.label = StaticTextNew(parent, -1, name, style =wx.ALIGN_RIGHT, size=(labelw,-1) ) self.label.SetFont(self.font) self.Add( self.label, 0, wx.CENTER ) self.value = TextCtrlNew(parent, value=str(init), style=wx.TE_PROCESS_ENTER) self.value.SetWindowStyle(wx.TE_RIGHT) self.value.SetFont(self.font) self.value.Bind(wx.EVT_TEXT, OnEdit) self.Add( self.value, 1, wx.CENTER|wx.EXPAND )
def __init__(self, title, pos, size): self.threads = [] self.getsession = [] self.MAC='' self.IP='' wx.Frame.__init__(self, None, -1, title, pos, size) menuFile = wx.Menu() menuFile.Append(1, u"&??...",u"?????") menuFile.Append(3,u"&????",u"?????IP") menuFile.AppendSeparator() menuFile.Append(2,u"&Bug Report",u"???????bug?") menuBar = wx.MenuBar() menuBar.Append(menuFile, u"&??") self.SetMenuBar(menuBar) self.Bind(wx.EVT_MENU, self.OnAbout,id=1) self.Bind(wx.EVT_MENU,self.OnBugReport,id=2) hosts = self.Bind(wx.EVT_MENU,self.OnSet,id=3) self.CreateStatusBar() self.SetStatusText(u"????") panel = wx.Panel(self) self.connect = wx.Button(panel,label=u"??",pos=(240, 60),size=(80, 50)) self.disconnect = wx.Button(panel,label=u"??",pos=(330,60),size=(80,50)) self.connect.Disable() self.disconnect.Disable() self.Bind(wx.EVT_BUTTON, self.OnDisconnect,self.disconnect) self.Bind(wx.EVT_BUTTON,self.OnConnect,self.connect) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) wx.StaticText(panel, -1, u"???:", pos=(28, 40)) self.username = wx.TextCtrl(panel, -1 ,pos=(80, 40)) self.username.SetInsertionPoint(0) self.Bind(wx.EVT_TEXT,self.Onuser,self.username) wx.StaticText(panel,-1,u"??:",pos=(242,40)) self.pwd = wx.TextCtrl(panel, -1,pos=(280,40),style=wx.TE_PASSWORD |wx.TE_PROCESS_ENTER) self.Bind(wx.EVT_TEXT,self.Onpwd,self.pwd) wx.CheckBox(panel, -1, u"????", (20, 80), (150, 20)) wx.CheckBox(panel, -1, u"????", (110, 80), (150, 20))
def __init__(self, parent, choices=None, dropDownClick=True, element_path=None, **therest): """ Constructor works just like wx.TextCtrl except you can pass in a list of choices. You can also change the choice list at any time by calling setChoices. """ therest['style'] = wx.TE_PROCESS_ENTER | therest.get('style', 0) wx.TextCtrl.__init__(self, parent, **therest) # Some variables self._dropDownClick = dropDownClick self._lastinsertionpoint = None self._hasfocus = False self._screenheight = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) self.element_path = element_path self.listbox = None self.SetChoices(choices) # gp = self # while ( gp != None ) : # gp.Bind ( wx.EVT_MOVE , self.onControlChanged, gp ) # gp.Bind ( wx.EVT_SIZE , self.onControlChanged, gp ) # gp = gp.GetParent() self.Bind(wx.EVT_KILL_FOCUS, self.OnControlChanged) self.Bind(wx.EVT_TEXT_ENTER, self.OnControlChanged) self.Bind(wx.EVT_TEXT, self.OnEnteredText) self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) # If need drop down on left click if dropDownClick: self.Bind(wx.EVT_LEFT_DOWN, self.OnClickToggleDown) self.Bind(wx.EVT_LEFT_UP, self.OnClickToggleUp)
def __init__( self, parent,): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = 'Plugin List', pos = wx.DefaultPosition, size = wx.Size( 612,500 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) logopath = os.path.join(root_dir, 'data/logo.ico') self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_3DLIGHT ) ) self.SetIcon(wx.Icon(logopath, wx.BITMAP_TYPE_ICO)) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, "Search:", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText1.Wrap( -1 ) bSizer2.Add( self.m_staticText1, 0, wx.ALIGN_CENTER|wx.ALL, 5 ) self.txt_search = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) bSizer2.Add( self.txt_search, 1, wx.ALL, 5 ) bSizer1.Add( bSizer2, 0, wx.EXPAND, 5 ) self.lst_plgs = VirtualListCtrl( self, ['Name', 'Location']) self.lst_plgs.SetColumnWidth(0,200) self.lst_plgs.SetColumnWidth(1,400) bSizer1.Add( self.lst_plgs, 1, wx.ALL|wx.EXPAND, 5 ) self.SetSizer( bSizer1 ) self.Layout() self.Centre( wx.BOTH ) # Connect Events self.txt_search.Bind( wx.EVT_TEXT, self.on_search ) self.lst_plgs.Bind( wx.EVT_LIST_ITEM_ACTIVATED, self.on_run ) self.load()
def __init__( self, parent): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = 'Plugin List', pos = wx.DefaultPosition, size = wx.Size( 412,500 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) logopath = os.path.join(root_dir, 'data/logo.ico') self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_3DLIGHT ) ) self.SetIcon(wx.Icon(logopath, wx.BITMAP_TYPE_ICO)) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, "Search:", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText1.Wrap( -1 ) bSizer2.Add( self.m_staticText1, 0, wx.ALIGN_CENTER|wx.ALL, 5 ) self.txt_search = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) bSizer2.Add( self.txt_search, 1, wx.ALL, 5 ) bSizer1.Add( bSizer2, 0, wx.EXPAND, 5 ) self.lst_plgs = VirtualListCtrl( self, ['Name', 'Shotcut']) self.lst_plgs.SetColumnWidth(0,200) self.lst_plgs.SetColumnWidth(1,200) bSizer1.Add( self.lst_plgs, 1, wx.ALL|wx.EXPAND, 5 ) self.SetSizer( bSizer1 ) self.Layout() self.Centre( wx.BOTH ) # Connect Events self.txt_search.Bind( wx.EVT_TEXT, self.on_search ) self.lst_plgs.Bind(wx.EVT_LIST_KEY_DOWN, self.on_run) self.load() self.Bind(wx.EVT_CLOSE, self.on_close)
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
def __init__(self, *args, **kwds): # begin wxGlade: Institution.__init__ kwds["style"] = wx.CAPTION | wx.MAXIMIZE|wx.CLOSE_BOX | wx.MINIMIZE_BOX # | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Institution Settings") self.label_2 = wx.StaticText(self, -1, "School Name") self.text_ctrl_5 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "") self.label_4 = wx.StaticText(self, -1, "School Code") self.text_ctrl_6 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "") self.label_6 = wx.StaticText(self, -1, "E-Mail") self.text_ctrl_1 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.label_7 = wx.StaticText(self, -1, "Phone") self.text_ctrl_2 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.label_8 = wx.StaticText(self, -1, "Place") self.text_ctrl_3 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "Save") self.DB=db_operations() self.__set_properties() self.__do_layout() self.OnLoad() self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1) self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2) self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2) # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: Institution.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Institution Settings") self.label_2 = wx.StaticText(self, -1, "School Name") self.text_ctrl_5 = wx.TextCtrl(self, -1, "",style=wx.TE_READONLY)#wx.StaticText(self, -1, "") self.label_4 = wx.StaticText(self, -1, "School Code") self.text_ctrl_6 = wx.TextCtrl(self, -1, "",style=wx.TE_READONLY)#wx.StaticText(self, -1, "") self.label_6 = wx.StaticText(self, -1, "E-Mail") self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER ) self.label_7 = wx.StaticText(self, -1, "Contact") self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER ) self.label_8 = wx.StaticText(self, -1, "DEO") self.text_ctrl_3 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER) self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "OK") self.DB=db_operations() self.__set_properties() self.__do_layout() self.OnLoad() self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1) self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2) self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2) self.Bind(wx.EVT_CLOSE, self.OnClose) # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.text_ctrl_passwd = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel")) self.button_ok = wx.Button(self, wx.ID_ANY, _("OK")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_passwod, self.text_ctrl_passwd) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_button_ok, self.button_ok) # end wxGlade
def create_textctrl(**kwargs): panel = kwargs.get('panel') value = kwargs.get('value') key = kwargs.get('key') bind = kwargs.get('bind') item_sizer = wx.BoxSizer(wx.HORIZONTAL) item_name = MODULE_KEY.join(key) item_box = wx.TextCtrl(panel, id=id_renew(item_name, update=True), value=unicode(value)) item_box.Bind(wx.EVT_TEXT, bind) item_text = wx.StaticText(panel, label=translate_key(item_name)) item_sizer.Add(item_text, 0, wx.ALIGN_CENTER) item_sizer.Add(item_box) return {'item': item_sizer, 'text_size': item_text.GetSize()[0], 'text_ctrl': item_text}
def __init__(self): wx.Frame.__init__(self, None, wx.ID_ANY, 'wxArsShortener', size=(300,70)) # Add a panel so it looks the correct on all platforms panel = wx.Panel(self, wx.ID_ANY) self.txt = wx.TextCtrl(panel, wx.ID_ANY, "", size=(300, -1)) self.txt.Bind(wx.EVT_TEXT, self.onTextChange) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.txt, 0, wx.EXPAND, 5) panel.SetSizer(sizer)
def __init__(self, *args, **kwargs): super(EncapsulatedTextCtrl, self).__init__(*args, **kwargs) self.control.Bind(wx.EVT_TEXT, self.on_change)
def __init__(self, *args, **kwargs): self._uiobj = wx.TextCtrl(*args, **kwargs) # self.range = None self.default = None # self._uiobj.Bind(wx.EVT_TEXT, self._on_text) # def set_range(self, range): # self.range = range
def bind(self, handler, id): self._uiobj.Bind(wx.EVT_TEXT, handler, id=id)
def __init__(self): # creat app object self.app = wx.App() # Set up the main window wx.Frame.__init__(self, parent=None, title='Background Checker', size=(400, 300)) # The platforms available self.platforms = ['reddit', 'twitter'] """ Layout panel and hbox """ self.panel = wx.Panel(self, size=(500, 100)) self.box = wx.BoxSizer(wx.VERTICAL) # Greeting combobox self.platform = wx.ComboBox(parent=self.panel, value='Please Select an Option', size=(180, -1), choices=self.platforms) # Add the platform button to the hbox self.box.Add(self.platform, 0, wx.TOP) self.box.Add((-1, 10)) """ setup username textbox entry """ username_prompt = 'Please type a username (type a letter to clear this field)' self.username_textbox = wx.TextCtrl(parent=self.panel, size=(280, -1), value=username_prompt) # Add the greeting combo to the hbox self.box.Add(self.username_textbox, 0, wx.TOP) # Add padding to lower the button position self.box.Add((-1, 100)) # The background check button self.background_check_button = wx.Button(self.panel, 10, '&Background Check') """ Bind an event for the button """ self.Bind(wx.EVT_TEXT, self.clear_textbox, self.username_textbox) self.Bind(wx.EVT_BUTTON, self.record_username, self.background_check_button) # Add the button to the hbox self.box.Add(self.background_check_button, 0, flag=wx.ALIGN_CENTER | wx.BOTTOM) # Tell the panel to use the hbox self.panel.SetSizer(self.box)
def __init__(self, parent, sms): wxskinDialog.__init__(self, parent, -1, "SMS edit") self.SetAutoLayout(False) self.sms = sms # Main window resizer object sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.FlexGridSizer(4,1) self.smsLabel = wx.StaticText(self, -1, "Message Text (%d / 160)" % len(sms.message)) sizer.Add(self.smsLabel, 1, wx.ALIGN_CENTER | wx.ALL, 5) smsTextId = wx.NewId() self.smsText = wx.TextCtrl(self, smsTextId, sms.message, size=(300,100), style=wx.TE_MULTILINE | wx.TE_LINEWRAP, validator = pySIMvalidator(None, None, 160)) sizer.Add(self.smsText, 1, wx.ALIGN_CENTER | wx.ALL, 5) hsizer = wx.FlexGridSizer(2,3) label = wx.StaticText(self, -1, "Date: ") hsizer.Add(label, 1, wx.ALL, 5) label = wx.StaticText(self, -1, "From: ") hsizer.Add(label, 1, wx.ALL, 5) label = wx.StaticText(self, -1, "Status: ") hsizer.Add(label, 1, wx.ALL, 5) text = wx.TextCtrl(self, -1, self.sms.timestamp, style=wx.TE_READONLY) hsizer.Add(text, 1, wx.ALL, 5) self.numberCtrl = wx.TextCtrl(self, -1, self.sms.number, validator = pySIMvalidator("+*#pw0123456789", None, 20)) hsizer.Add(self.numberCtrl, 1, wx.ALL, 5) choiceList = ['Read', 'Unread', 'Deleted'] self.ch = wx.Choice(self, -1, (80, 50), choices = choiceList) for i in range(len(choiceList)): if sms.status == choiceList[i]: self.ch.SetSelection(i) break hsizer.Add(self.ch, 1, wx.ALL, 5) sizer.Add(hsizer, 1, wx.ALL, 5) buttons = wx.BoxSizer(wx.HORIZONTAL) buttons.Add(wx.Button(self, ID_BUTTON_OK, "Save"), 1, wx.ALIGN_LEFT | wx.ALL, 20) buttons.Add(wx.Button(self, wx.ID_CANCEL, "Cancel"), 1, wx.ALIGN_RIGHT | wx.ALL, 20) sizer.Add(buttons, 1, wx.ALIGN_CENTER | wx.ALL, 5) wx.EVT_BUTTON(self, ID_BUTTON_OK, self.onOK) wx.EVT_TEXT(self.smsText, smsTextId, self.smsTextChange) self.SetAutoLayout(1); self.SetSizer(sizer) sizer.Fit(self) self.Layout()
def initSigControls(self): """Initialize signal controls. """ sigSizer = wx.BoxSizer(orient=wx.VERTICAL) scaleControlBox = widgets.ControlBox(self, label='Noise Scale', orient=wx.HORIZONTAL) self.scaleText = wx.StaticText(self, label='%4.1f' % self.src.scale.value) 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=self.src.scale.value*10.0, 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.ALL | wx.EXPAND, border=10) erpSpeedControlBox = widgets.ControlBox(self, label='ERP Speed', orient=wx.HORIZONTAL) self.erpSpeedText = wx.StaticText(self, label='%4.1f' % self.src.erpSpeed.value) erpSpeedTextSizer = wx.BoxSizer(orient=wx.VERTICAL) erpSpeedTextSizer.Add(self.erpSpeedText, proportion=1, flag=wx.EXPAND) self.erpSpeedSlider = wx.Slider(self, style=wx.SL_HORIZONTAL, value=self.src.erpSpeed.value*10.0, minValue=1, maxValue=300) self.Bind(wx.EVT_SLIDER, self.setERPSpeed, self.erpSpeedSlider) erpSpeedControlBox.Add(erpSpeedTextSizer, proportion=0, flag=wx.ALL, border=10) erpSpeedControlBox.Add(self.erpSpeedSlider, proportion=1, flag=wx.ALL | wx.EXPAND, border=10) sigSizer.Add(erpSpeedControlBox, proportion=0, flag=wx.EXPAND | wx.LEFT | wx.BOTTOM | wx.RIGHT, border=10) triggerControlBox = widgets.ControlBox(self, label='Trigger', orient=wx.HORIZONTAL) self.triggerValueTextCtrl = wx.TextCtrl(self, value=str(self.src.trigger.value))#, style=wx.TE_PROCESS_ENTER) self.Bind(wx.EVT_TEXT, self.setTrigger, self.triggerValueTextCtrl) self.triggerButton = wx.Button(self, label='Manual') self.Bind(wx.EVT_BUTTON, self.manualTrigger, self.triggerButton) triggerControlBox.Add(self.triggerValueTextCtrl, proportion=1, flag=wx.ALL | wx.EXPAND, border=10) triggerControlBox.Add(self.triggerButton, proportion=1, flag=wx.TOP | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=10) sigSizer.Add(triggerControlBox, proportion=0, flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10) self.sizer.Add(sigSizer)
def __init__(self, parent, name, smax, smin, sinc, sinit, stextwidth, swidth): if abs(sinc) < 1.0: self.precision = "%."+str(str(sinc)[::-1].find('.'))+"f" else: self.precision = "%d" def OnSpin(pos): self.value.ChangeValue(self.precision%(sinc * pos + self.remainder)) def OnEdit(event): text = event.GetString() point = self.value.GetInsertionPoint() if (IsNumber(self.value.GetValue()) == False): self.value.SetBackgroundColour( "Pink" ) self.value.SetForegroundColour( "Black" ) else: self.value.SetBackgroundColour(wx.NullColour) self.value.SetForegroundColour(wx.NullColour) self.value.ChangeValue(text) self.value.SetInsertionPoint(point) if ( text == '' or text == '.'): self.spin.SetValue(smin/sinc); try: self.spin.SetValue(int(float(text)/sinc)) except: pass event.Skip() fontpointsize=wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT).GetPointSize() self.font = wx.Font(fontpointsize, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) dc = wx.ScreenDC() dc.SetFont(self.font) textw,texth = dc.GetTextExtent(name) if textw > stextwidth: labelw = textw else: labelw = stextwidth wx.BoxSizer.__init__(self, wx.HORIZONTAL) self.label = StaticTextNew(parent, -1, name, style=wx.ALIGN_RIGHT, size=(labelw,-1) ) self.label.SetFont(self.font) self.Add( self.label, 0, wx.CENTER ) self.value = TextCtrlNew(parent, value=str(sinit),size=(swidth, -1), style=wx.TE_PROCESS_ENTER) self.value.SetWindowStyle(wx.TE_RIGHT) self.value.SetFont(self.font) self.value.Bind(wx.EVT_TEXT, OnEdit) self.Add( self.value, 0, wx.CENTER ) bw,bh = dc.GetTextExtent("0") spinw = int(1.5*bh) self.spin = SpinButtonNew(parent, size=(spinw,-1), spinfunc=OnSpin) self.spin.SetRange(int(smin/sinc), int(smax/sinc)) self.spin.SetValue(int(sinit/sinc)) self.remainder = smin%sinc self.Add( self.spin, 0, wx.CENTER ) self.IsEnabled = True self.Layout() self.Show()
def __init__(self, parent, controller, tagname, initial=False): """ Constructor @param parent: Parent wx.Window of dialog for modal @param controller: Reference to project controller @param tagname: Tagname of project POU edited @param initial: True if step is initial (default: False) """ BlockPreviewDialog.__init__(self, parent, controller, tagname, title=_('Edit Step')) # Init common sizers self._init_sizers(2, 0, 6, None, 2, 1) # Create label for SFC step name name_label = wx.StaticText(self, label=_('Name:')) self.LeftGridSizer.AddWindow(name_label, flag=wx.GROW) # Create text control for defining SFC step name self.StepName = wx.TextCtrl(self) self.Bind(wx.EVT_TEXT, self.OnNameChanged, self.StepName) self.LeftGridSizer.AddWindow(self.StepName, flag=wx.GROW) # Create label for SFC step connectors connectors_label = wx.StaticText(self, label=_('Connectors:')) self.LeftGridSizer.AddWindow(connectors_label, flag=wx.GROW) # Create check boxes for defining connectors available on SFC step self.ConnectorsCheckBox = {} for name, label in [("input", _("Input")), ("output", _("Output")), ("action", _("Action"))]: check_box = wx.CheckBox(self, label=label) if name == "output" or (name == "input" and not initial): check_box.SetValue(True) self.Bind(wx.EVT_CHECKBOX, self.OnConnectorsChanged, check_box) self.LeftGridSizer.AddWindow(check_box, flag=wx.GROW) self.ConnectorsCheckBox[name] = check_box # Add preview panel and associated label to sizers self.RightGridSizer.AddWindow(self.PreviewLabel, flag=wx.GROW) self.RightGridSizer.AddWindow(self.Preview, flag=wx.GROW) # Add buttons sizer to sizers self.MainSizer.AddSizer( self.ButtonSizer, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT) # Save flag that indicates that step is initial self.Initial = initial # Set default name for step self.StepName.ChangeValue(controller.GenerateNewName( tagname, None, "Step%d", 0)) self.Fit() # Step name text control is default control having keyboard focus self.StepName.SetFocus()
def __init__(self, *args, **kwds): # begin wxGlade: sampoorna_win.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0) self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY) self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!")) self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login")) self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL) self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username")) self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER) self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password")) self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER) self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>")) self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL) self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard")) self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard")) self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard")) self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous")) self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>")) self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress")) self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100) self.progress_each = wx.Gauge(self.panel_2, wx.ID_ANY, range=100) self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status")) self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER) self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw) self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user) self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10) self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed) self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished) # create a pubsub receiver Publisher().subscribe(self.updateDisplay, "update") # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: sampoorna_win.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Dialog.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0) self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY) self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!")) self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna credentials. It is used for one time login")) self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL) self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username")) self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER) self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password")) self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER) self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>")) self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL) self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard")) self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard")) self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard")) self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous")) self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>")) self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress")) self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100) self.label_progress_perc = wx.StaticText(self.panel_2, wx.ID_ANY, ("")) self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status")) #self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER) self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER) self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw) self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user) self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10) self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed) self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished) # create a pubsub receiver Publisher().subscribe(self.update_display, "update") Publisher().subscribe(self.final_report, "report") Publisher().subscribe(self.update_progress_bar, "progress_bar") Publisher().subscribe(self.update_current_class, "change_class") # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: sampoorna_win.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN wx.Dialog.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0) self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY) self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!")) self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna username or password. It is used for one time login")) self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL) self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username")) self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER) self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password")) self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER) self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>")) self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL) self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard")) self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard")) self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard")) self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous")) self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>")) self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress")) self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100) self.progress_each =wx.StaticText(self.panel_2, wx.ID_ANY)# wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_READONLY) self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status")) self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER) self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw) self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user) self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9) self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10) self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed) self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished) # end wxGlade # create a pubsub receiver Publisher().subscribe(self.update_display, "update") Publisher().subscribe(self.final_report, "report") Publisher().subscribe(self.update_progress_bar, "progress_bar") Publisher().subscribe(self.update_current_class, "change_class")