示例#1
0
 def focus_out(self, event = None):
   value = self.value.get()
   
   if self.unicode: value = unicodify(value)
   else:            value = encode   (value)
   
   if value != self.old_value: self.validate()
示例#2
0
 def validate(self, event = None):
   value = self.text.get("0.0", "end")
   if value[-1] == "\n": value = value[0:-1]
   if self.unicode: value = unicodify(value)
   else:            value = encode   (value)
   self.set_value(value)
示例#3
0
 def validate(self, event = None):
   value = self.value.get()
   if self.unicode: value = unicodify(value)
   else:            value = encode   (value)
   self.old_value = value
   self.set_value(value)