@@ -30,7 +30,7 @@ def __init__(self, parent, rang, accury, title, unit):
3030 def Bind (self , z , f ):self .f = f
3131
3232 def ontext (self , event ):
33- self .f (event )
33+ self .f (self )
3434 if self .GetValue ()== None :
3535 self .ctrl .SetBackgroundColour ((255 ,255 ,0 ))
3636 else :
@@ -78,7 +78,7 @@ def __init__(self, parent, title, unit):
7878 def Bind (self , z , f ):self .f = f
7979
8080 def ontext (self , event ):
81- self .f (event )
81+ self .f (self )
8282
8383 def SetValue (self , n ):
8484 self .ctrl .SetValue (n )
@@ -120,7 +120,7 @@ def oncolor(self, event):
120120 rst = dialog .GetColourData ().GetColour ()
121121 self .ctrl .SetBackgroundColour (rst )
122122 self .ctrl .SetValue (rst .GetAsString (wx .C2S_HTML_SYNTAX ))
123- self .f (event )
123+ self .f (self )
124124 dialog .Destroy ()
125125
126126 def SetValue (self , color ):
@@ -199,7 +199,7 @@ def Bind(self, z, f):
199199 self .f = f
200200
201201 def on_choice (self , event ):
202- self .f (event )
202+ self .f (self )
203203
204204 def SetValue (self , x ):
205205 n = self .choices .index (x ) if x in self .choices else 0
@@ -260,7 +260,7 @@ def GetValue(self):
260260
261261 # Virtual event handlers, overide them in your derived class
262262 def on_text ( self , event ):
263- self .f (event )
263+ self .f (self )
264264 if self .GetValue ()== None :
265265 self .txt_value .SetBackgroundColour ((255 ,255 ,0 ))
266266 else : self .txt_value .SetBackgroundColour ((255 ,255 ,255 ))
@@ -292,7 +292,7 @@ def Bind(self, z, f):
292292 self .f = f
293293
294294 def on_check (self , event ):
295- self .f (event )
295+ self .f (self )
296296
297297 def GetValue (self ):
298298 return [self .choices [i ] for i in self .ctrl .GetCheckedItems ()]
@@ -354,14 +354,14 @@ def on_scroll(self, event):
354354 n = value / 255.0 * (self .max - self .min )+ self .min
355355 self .text .SetValue (str (round (n ,self .accury ) if self .accury > 0 else int (n )))
356356 self .text .SetBackgroundColour ((255 ,255 ,255 ))
357- self .f (event )
357+ self .f (self )
358358
359359 def on_spin (self , event ):
360360 self .slider .SetValue (self .spin .GetValue ())
361361 self .on_scroll (event )
362362
363363 def on_text (self , event ):
364- self .f (event )
364+ self .f (self )
365365 if self .GetValue ()== None :
366366 self .text .SetBackgroundColour ((255 ,255 ,0 ))
367367 else :
@@ -416,7 +416,7 @@ def __init__(self, parent, title):
416416 self .GetValue = check .GetValue
417417 check .Bind (wx .EVT_CHECKBOX , self .on_check )
418418
419- def on_check (self , event ):self .f (event )
419+ def on_check (self , event ):self .f (self )
420420 def Bind (self , z , f ): self .f = f
421421
422422if __name__ == '__main__' :
0 commit comments