[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-11-01 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-11-01 Thread E. Paine
E. Paine added the comment: This is definitely a Tk issue, but it is resolved as of Tk 8.6.11. I assume this is similar to #41969. Strangely, the Windows installers for 3.10 and 3.11 appear to still be using Tk 8.6.10 despite PR-25170, rather than 8.6.11. I'll raise it on #43652.

[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-11-01 Thread Gabe
Gabe added the comment: I should add - the reason why this is an issue is because pyautogui calls this function, and I would like to use pyautogui in my tkinter app, but I currently cannot without sacrificing my checkbuttons. (Well, pyautogui uses pyscreeze for screenshots and pyscreeze

[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-11-01 Thread Gabe
Gabe added the comment: The exact same effect happens with SetProcessDPIAware(1). The IDLE checkboxes are in fact affected; they're tiny. I discovered that I was able to prevent the issue by using `ctypes.windll.shcore.SetProcessDpiAwareness(0)`. This prevents the issue only if it is called

[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-11-01 Thread E. Paine
E. Paine added the comment: What happens if you use `ctypes.windll.user32.SetProcessDPIAware(1)` (note the 1)? Also, are the checkboxes on the IDLE config dialog affected (since IDLE also sets the dpi awareness: see

[issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()

2021-10-31 Thread Gabe
New submission from Gabe : In the following code: ```py import tkinter as tk from tkinter import ttk import ctypes ctypes.windll.user32.SetProcessDPIAware() w = tk.Tk() ttk.Checkbutton(w, text = "Checkbox").grid() w.mainloop() ``` The checkbox begins as normal size, but after hovering over