问题
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?
回答1:
Tk sets state = ACTIVE when a mouse is over a non-DISABLED button option (i.e. NORMAL) It can then be made to appear raised, sunken, flat, flash etc. So basically, NORMAL enables a button while ACTIVE can change the appearance settings on mouse over etc. Hope this helps, there's a great post about it here:
http://tkinter.unpythonic.net/wiki/Widgets/Button
来源:https://stackoverflow.com/questions/19125342/difference-between-active-and-normal-state