Mercurial > cpython-lru_cache-weakref
diff Lib/lib-tk/ScrolledText.py @ 1757:697ee89addfe legacy-trunk
Use new packing and 'name' in cnf dict
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 03 Aug 1994 08:08:26 +0000 |
| parents | 2ef9d50ab654 |
| children | b61939524c3c |
line wrap: on
line diff
--- a/Lib/lib-tk/ScrolledText.py Wed Aug 03 08:01:43 1994 +0000 +++ b/Lib/lib-tk/ScrolledText.py Wed Aug 03 08:08:26 1994 +0000 @@ -17,14 +17,16 @@ def __init__(self, master=None, cnf={}): cnf = _cnfmerge(cnf) fcnf = {} + vcnf = {'name': 'vbar', + Pack: {'side': 'right', 'fill': 'y'},} for k in cnf.keys(): - if type(k) == ClassType: + if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = Frame(master, fcnf) - self.vbar = Scrollbar(self.frame, { - Pack: {'side': 'right', 'fill': 'y'}}) + self.vbar = Scrollbar(self.frame, vcnf) cnf[Pack] = {'side': 'left', 'fill': 'both', 'expand': 'yes'} + cnf['name'] = 'text' Text.__init__(self, self.frame, cnf) self['yscrollcommand'] = (self.vbar, 'set') self.vbar['command'] = (self, 'yview')
