Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 289ad8f

Browse files
author
Fredrik Lundh
committed
-- added optional newstate argument to Wm.state. The newstate arg
was added in Tk 8.3 (this fixes the first part of Bug #110605)
1 parent 8fffa20 commit 289ad8f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/lib-tk/Tkinter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,10 +1434,10 @@ def wm_sizefrom(self, who=None):
14341434
"program"."""
14351435
return self.tk.call('wm', 'sizefrom', self._w, who)
14361436
sizefrom = wm_sizefrom
1437-
def wm_state(self):
1438-
"""Return the state of this widget as one of normal,
1439-
icon, iconic (see wm_iconwindow) and withdrawn."""
1440-
return self.tk.call('wm', 'state', self._w)
1437+
def wm_state(self, newstate=None):
1438+
"""Query or set the state of this widget as one of normal, icon,
1439+
iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only)."""
1440+
return self.tk.call('wm', 'state', self._w, newstate)
14411441
state = wm_state
14421442
def wm_title(self, string=None):
14431443
"""Set the title of this widget."""

0 commit comments

Comments
 (0)