Use text object's new settext() method.

This commit is contained in:
Guido van Rossum 1991-04-21 19:27:48 +00:00
parent 7912b008cf
commit a82a27585a
2 changed files with 8 additions and 2 deletions

View File

@ -14,6 +14,9 @@ class TextEdit():
self.editor = 0
return self
#
def settext(self, text):
self.editor.settext(text)
#
# Downcalls from parent to child
#
def destroy(self):
@ -35,7 +38,7 @@ class TextEdit():
def realize(self):
self.window = self.parent.getwindow()
self.editor = self.window.textcreate(self.bounds)
self.editor.replace(self.text)
self.editor.settext(self.text)
self.parent.need_mouse(self)
self.parent.need_keybd(self)
self.parent.need_altdraw(self)

View File

@ -14,6 +14,9 @@ class TextEdit():
self.editor = 0
return self
#
def settext(self, text):
self.editor.settext(text)
#
# Downcalls from parent to child
#
def destroy(self):
@ -35,7 +38,7 @@ class TextEdit():
def realize(self):
self.window = self.parent.getwindow()
self.editor = self.window.textcreate(self.bounds)
self.editor.replace(self.text)
self.editor.settext(self.text)
self.parent.need_mouse(self)
self.parent.need_keybd(self)
self.parent.need_altdraw(self)