summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-04-21 19:27:48 (GMT)
committerGuido van Rossum <guido@python.org>1991-04-21 19:27:48 (GMT)
commita82a27585ab717e660f60a5d8f417d88c8abd3e8 (patch)
treee140bd2a03864fd3e820eeedace70c160ae3d7ed /Lib
parent7912b008cf432a5408612fff77d4749793678dc9 (diff)
downloadcpython-a82a27585ab717e660f60a5d8f417d88c8abd3e8.zip
cpython-a82a27585ab717e660f60a5d8f417d88c8abd3e8.tar.gz
cpython-a82a27585ab717e660f60a5d8f417d88c8abd3e8.tar.bz2
Use text object's new settext() method.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-stdwin/TextEdit.py5
-rwxr-xr-xLib/stdwin/TextEdit.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/Lib/lib-stdwin/TextEdit.py b/Lib/lib-stdwin/TextEdit.py
index 8d12465..d7b2236 100644
--- a/Lib/lib-stdwin/TextEdit.py
+++ b/Lib/lib-stdwin/TextEdit.py
@@ -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)
diff --git a/Lib/stdwin/TextEdit.py b/Lib/stdwin/TextEdit.py
index 8d12465..d7b2236 100755
--- a/Lib/stdwin/TextEdit.py
+++ b/Lib/stdwin/TextEdit.py
@@ -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)