Skip to content

Checkbutton will not work properly when font is set to a color "near" white #96550

Closed as not planned
@gitagogaming

Description

@gitagogaming

I stumbled on this bug for at least an hour today before I noticed it was an actual bug

When the text is colored near/close to white it will not activate properly

Python Version: 3.9.9
Operating System: Windows 10 64bit

Here is a code snippet so you can try for yourself.

from tkinter import * 


root = Tk()
root.geometry("300x200")
  
w = Label(root, text ='Broken Checkbox', font = "50") 
w.pack()

        
enable_DVR = IntVar()
broken_checkbox = IntVar()

chk_EnableDVR = Checkbutton(root, text="MEH",
    variable=enable_DVR,
    foreground="red",
    background="#585858",
    offvalue=0,
    onvalue=1
    
)

broken_checkbox = Checkbutton(root, text="MEH2",
    variable=broken_checkbox,
    foreground="#F5F5F5",
    background="#585858",
    offvalue=0,
    onvalue=1
    
)

broken_checkbox.pack()
chk_EnableDVR.pack()

  
mainloop() 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions