Tal Einat <talei...@gmail.com> added the comment:
To get the maximum available height, does Tk's wm_maxsize() not work? https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M54 Answering my own question above: No, it gives the total screen height, which doesn't ignore e.g. taskbars. The best way to get the actual available height appears to be: 1. create a hidden window 2. maximize it with wm_state("zoomed") 3. get its height with winfo_height() Testing on Windows, this does respect the taskbar, as well as scaling in the display settings. (Also note that Tk window heights appear not to include the window manager's title bar.) I've yet to test on other OSs, but I've seen this method recommended before, and it has the potential to be robust. Terry, would you like to see a PR with such an implementation? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37039> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com