Skip to content

Commit 107e623

Browse files
committed
grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 row2?
1 parent 8860405 commit 107e623

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Lib/lib-tk/Tkinter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,14 @@ def place_slaves(self):
651651
self.tk.call(
652652
'place', 'slaves', self._w)))
653653
# Grid methods that apply to the master
654-
def grid_bbox(self, column, row):
655-
return self._getints(
656-
self.tk.call(
657-
'grid', 'bbox', self._w, column, row)) or None
654+
def grid_bbox(self, column=None, row=None, col2=None, row2=None):
655+
args = ('grid', 'bbox', self._w)
656+
if column is not None and row is not None:
657+
args = args + (column, row)
658+
if col2 is not None and row2 is not None:
659+
args = args + (col2, row2)
660+
return self._getints(apply(self.tk.call, args)) or None
661+
658662
bbox = grid_bbox
659663
def _grid_configure(self, command, index, cnf, kw):
660664
if type(cnf) is StringType and not kw:

0 commit comments

Comments
 (0)