当我禁用带有图像的按钮时,图像会在其上覆盖一个白色滤镜。我想禁用该过滤器,同时禁用该按钮。
import tkinter
import PIL
import PIL.ImageTk
root = tkinter.Tk ()
img = PIL.Image.new (mode = "RGB", size = (100, 100), color = (255, 0, 0))
tkImg = PIL.ImageTk.PhotoImage (img, master = root)
b = tkinter.Button (root, image = tkImg)
b.pack ()
b.config (state = "disabled")
root.mainloop ()