This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ttk.Sizegrip disappears under Windows 10 UI Scaling, with dpiAware set true and >1 scaling
Type: behavior Stage: resolved
Components: Tkinter Versions: Python 3.10
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: msmith, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2021-03-31 12:26 by msmith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg389893 - (view) Author: MikeS (msmith) Date: 2021-03-31 12:26
When using tkinter on Windows (10) with a >1 HiDpi screen the sizegrip disappear with dpiawareness is on. A minimal example is as follows:

import tkinter as tk
import tkinter.ttk as ttk
from ctypes import windll, pointer, wintypes
windll.shcore.SetProcessDpiAwareness(1)

root = tk.Tk()
btn1 = tk.Button(root, text='btn1').pack(side=tk.LEFT)
sg = ttk.Sizegrip(root).pack(side=tk.LEFT)
btn2 = tk.Button(root, text='btn2').pack(side=tk.LEFT, fill=tk.BOTH, expand=1)
root.mainloop()

Works fine with commented "SetProcessDpiAwareness", but not when using it. This might be related to the tk issues with hidpi and small radio/checkboxes https://bugs.python.org/issue41969
msg390145 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-04-03 22:20
In issue 33656, we determined that tcl/tk *is* dpi aware and that telling Windows so is needed for proper text display.  IDLE now issues the same Windows command (idlelib.pyshell, line 20).  This perhaps should be done by Python itself, but that is not my department.  In any case, without the setting, text in IDLE Windows is much uglier on my 27 inch 2560 x 1440 screen.

IDLE Windows do not currently have sizegrips.  This seems to be standard on Windows. One can resize by grabbing the bottom of the lower right corner. But it is a bit finicky.

When I run your code, I see the small, faint, sizegrip.  Perhaps my screen is not HiDpi enough to see the problem.  In any case, this is a tcl/tk issue.  Perhaps upgrading to 8.6.11 (#43652) will help, as it is supposed to for the radiobutton issue.
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87845
2021-04-03 22:20:22terry.reedysetstatus: open -> closed

versions: + Python 3.10, - Python 3.7
nosy: + terry.reedy, serhiy.storchaka

messages: + msg390145
resolution: third party
stage: resolved
2021-03-31 12:26:06msmithcreate