MCPcopy Create free account
hub / github.com/Image-Py/imagepy / ontext

Method ontext

imagepy/ui/widgets/normal.py:32–38  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

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)))

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.95

Tested by

no test coverage detected