diff options
author | Guido van Rossum <guido@python.org> | 1996-12-27 15:33:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-12-27 15:33:17 (GMT) |
commit | 8371013f9a50cf0fb38ba39dce1d83c6543ce9d3 (patch) | |
tree | af700397a6b910699f2d4f403f308dd1352146c1 /Lib/lib-tk/Tkinter.py | |
parent | 0b96b945b898d26d1c3497f80287f43837d17852 (diff) | |
download | cpython-8371013f9a50cf0fb38ba39dce1d83c6543ce9d3.zip cpython-8371013f9a50cf0fb38ba39dce1d83c6543ce9d3.tar.gz cpython-8371013f9a50cf0fb38ba39dce1d83c6543ce9d3.tar.bz2 |
Added config(ure) method to Image class.
(Fred Drake)
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 1e49f6e..286a557 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1612,6 +1612,16 @@ class Image: self.tk.call(self.name, 'configure', '-'+key, value) def __getitem__(self, key): return self.tk.call(self.name, 'configure', '-'+key) + def config(self, **kw): + res = () + for k, v in _cnfmerge(kw).items(): + if v is not None: + if k[-1] == '_': k = k[:-1] + if callable(v): + v = self._register(v) + res = res + ('-'+k, v) + apply(self.tk.call, (self.name, 'config') + res) + configure = config def height(self): return self.tk.getint( self.tk.call('image', 'height', self.name)) |