mirror of https://github.com/python/cpython.git
grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 row2?
This commit is contained in:
parent
88604056c5
commit
107e623ef0
|
@ -651,10 +651,14 @@ def place_slaves(self):
|
||||||
self.tk.call(
|
self.tk.call(
|
||||||
'place', 'slaves', self._w)))
|
'place', 'slaves', self._w)))
|
||||||
# Grid methods that apply to the master
|
# Grid methods that apply to the master
|
||||||
def grid_bbox(self, column, row):
|
def grid_bbox(self, column=None, row=None, col2=None, row2=None):
|
||||||
return self._getints(
|
args = ('grid', 'bbox', self._w)
|
||||||
self.tk.call(
|
if column is not None and row is not None:
|
||||||
'grid', 'bbox', self._w, column, row)) or 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
|
bbox = grid_bbox
|
||||||
def _grid_configure(self, command, index, cnf, kw):
|
def _grid_configure(self, command, index, cnf, kw):
|
||||||
if type(cnf) is StringType and not kw:
|
if type(cnf) is StringType and not kw:
|
||||||
|
|
Loading…
Reference in New Issue