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.

Author GabeMillikan
Recipients GabeMillikan
Date 2021-10-31.12:12:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org>
In-reply-to
Content
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 it, it becomes small. See attached gif.

The issue does not occur without the SetProcessDPIAware call. 

I am running Windows 11, and my screen resolution is 2560x1440. My Settings>System>Display>Custom Scaling is set to 150%. I believe that this is relevant because SetProcessDPIAware() directly affects the dpi awareness (aka 'custom scaling') of the program, according to Microsoft documentation.
History
Date User Action Args
2021-10-31 12:12:02GabeMillikansetrecipients: + GabeMillikan
2021-10-31 12:12:02GabeMillikansetmessageid: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org>
2021-10-31 12:12:02GabeMillikanlinkissue45681 messages
2021-10-31 12:12:01GabeMillikancreate