def __init__(self, parent): wx.TextCtrl.__init__(self, parent, wx.TE_RIGHT) wx.TextCtrl.Bind(self, wx.EVT_KEY_UP, self.ontext) wx.TextCtrl.Bind(self, wx.EVT_LEFT_DOWN, self.oncolor)