(self, event)
| 30 | def Bind(self, z, f):self.f = f |
| 31 | |
| 32 | def ontext(self, event): |
| 33 | self.f(event) |
| 34 | if self.GetValue()==None: |
| 35 | self.ctrl.SetBackgroundColour((255,255,0)) |
| 36 | else: |
| 37 | self.ctrl.SetBackgroundColour((255,255,255)) |
| 38 | self.Refresh() |
| 39 | |
| 40 | def SetValue(self, n): |
| 41 | self.ctrl.SetValue(str(round(n,self.accury) if self.accury>0 else int(n))) |