+
+ def toggleOverwrite(self):
+ if self.overwrite==1:
+ self.overwrite=0
+ else:
+ self.overwrite=1
+ self.update()
+
+ def deleteBackward(self):
+ self.Text = self.Text[:self.currPos - 1] + self.Text[self.currPos:]
+ self.left()
+ self.update()
+
+ def handleAscii(self, code):
+ newChar = unichr(code)
+ if self.overwrite==1:
+ self.Text = self.Text[0:self.currPos] + newChar + self.Text[self.currPos + 1:]
+ else:
+ self.Text = self.Text[0:self.currPos] + newChar + self.Text[self.currPos:]
+ self.right()
+