diff options
author | Barry Warsaw <barry@python.org> | 1998-12-15 00:44:15 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-12-15 00:44:15 (GMT) |
commit | 107e623ef012a586ed1c492098c2da2f8c740557 (patch) | |
tree | df81c05e0ce3b6d55c2e793c674fb1bfa4d37d9d /Lib/lib-tk/Tkinter.py | |
parent | 88604056c5d64cabfea975511c84155bbbc778e1 (diff) | |
download | cpython-107e623ef012a586ed1c492098c2da2f8c740557.zip cpython-107e623ef012a586ed1c492098c2da2f8c740557.tar.gz cpython-107e623ef012a586ed1c492098c2da2f8c740557.tar.bz2 |
grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 row2?
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 0f4c713..ba08cb1 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -651,10 +651,14 @@ class Misc: self.tk.call( 'place', 'slaves', self._w))) # Grid methods that apply to the master - def grid_bbox(self, column, row): - return self._getints( - self.tk.call( - 'grid', 'bbox', self._w, column, row)) or None + def grid_bbox(self, column=None, row=None, col2=None, row2=None): + args = ('grid', 'bbox', self._w) + if column is not None and row is not None: + args = args + (column, row) + if col2 is not None and row2 is not None: + args = args + (col2, row2) + return self._getints(apply(self.tk.call, args)) or None + bbox = grid_bbox def _grid_configure(self, command, index, cnf, kw): if type(cnf) is StringType and not kw: |