6

I have been using Tkinter from couple of weeks. One thing I have noticed is that the tkinter widgets (Button, etc.) have 3 states: NORMAL, ACTIVE and DISABLED. I understand the NORMAL and DISABLED states. Whats the difference between the ACTIVE and NORMAL states?

4

1 回答 1

6

Tk 设置 state = ACTIVE 当鼠标悬停在非禁用按钮选项(即 NORMAL)上时,它可以显示为凸起、凹陷、扁平、闪光等。所以基本上,NORMAL 启用按钮,而 ACTIVE 可以更改外观设置鼠标悬停等。希望这会有所帮助,这里有一篇很棒的帖子:

http://tkinter.unpythonic.net/wiki/Widgets/Button

于 2013-10-01T20:50:25.633 回答