* ScrolledText.py: added some more methods of Text (This should

really be done differently, e.g. by deriving from the Text class.)
This commit is contained in:
Guido van Rossum 1994-07-06 09:28:21 +00:00
parent 639b8b8d9a
commit a3cd357771
2 changed files with 20 additions and 0 deletions

View File

@ -30,6 +30,16 @@ class ScrolledText(Pack, Place):
# XXX should do all Text methods... # XXX should do all Text methods...
self.pack = self.frame.pack self.pack = self.frame.pack
self.forget = self.frame.forget self.forget = self.frame.forget
self.delete = self.text.delete
self.insert = self.text.insert
self.index = self.text.index
self.get = self.text.get
self.mark_set = self.text.mark_set
self.tag_add = self.text.tag_add
self.tag_delete = self.text.tag_delete
self.tag_remove = self.text.tag_remove
self.yview = self.text.yview
self.yview_pickplace = self.text.yview_pickplace
self.tk = master.tk self.tk = master.tk
def __str__(self): def __str__(self):
return str(self.frame) return str(self.frame)

View File

@ -30,6 +30,16 @@ class ScrolledText(Pack, Place):
# XXX should do all Text methods... # XXX should do all Text methods...
self.pack = self.frame.pack self.pack = self.frame.pack
self.forget = self.frame.forget self.forget = self.frame.forget
self.delete = self.text.delete
self.insert = self.text.insert
self.index = self.text.index
self.get = self.text.get
self.mark_set = self.text.mark_set
self.tag_add = self.text.tag_add
self.tag_delete = self.text.tag_delete
self.tag_remove = self.text.tag_remove
self.yview = self.text.yview
self.yview_pickplace = self.text.yview_pickplace
self.tk = master.tk self.tk = master.tk
def __str__(self): def __str__(self):
return str(self.frame) return str(self.frame)