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

Skip to content

Commit cef4c84

Browse files
committed
Turns out that 'winfo id' returns the id as a hex string, with 0x prefix.
The int() function (aliased to getint()) doesn't handle that, so we must use self.tk.getint() again...
1 parent 268824e commit cef4c84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/lib-tk/Tkinter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def winfo_height(self):
332332
return getint(
333333
self.tk.call('winfo', 'height', self._w))
334334
def winfo_id(self):
335-
return getint(
335+
return self.tk.getint(
336336
self.tk.call('winfo', 'id', self._w))
337337
def winfo_interps(self, displayof=0):
338338
args = ('winfo', 'interps') + self._displayof(displayof)

0 commit comments

Comments
 (0)