📜  tkinter 按钮前景色点击 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.282000             🧑  作者: Mango

代码示例2
# use activebackground and activeforeground properties to change the 
# button color at the instance of being pressed.
btn = Button(frame, text="Click me", activebackground="blue",
             activeforeground="white")
# activebackground will change the background of the button when clicked
# activeforeground will change the text color of the button when clicked