title: Odd Tkinter mouse-over behavior
body: <p>I've been trying to get a mouse-over event to change the background color of a butten widget in Tkinter. I got some simple code online which works for text, but fails for color. Here it is:</p>
  
  <pre><code>from Tkinter import *
  root - Tk()
  
  b = Button(root, text='foo')
  b.pack()
  
  def enterB(event):
      b.configure(text='bar', background='red')
  
  def leaveB(event):
      b.configure(text='foo')
  
  b.bind('&lt;Enter&gt;', enterB)
  b.bind('&lt;Leave&gt;', leaveB)
  
  root.mainloop()
  </code></pre>
  
  <p>When I put my mouse over the button, the text changes to 'bar', but the background color stays gray. When my mouse leaves the area over the button, the background color changes to red, and the text changes to 'foo'. This is the opposite of what should happen.</p>
  
  <p>If I put background='blue' in the b.configure statement in the leaveB function, and leave the rest the same, leaving the button will leave the button blue, and it will never be red.</p>
  
  <p>Can anyone tell me what's happening?</p>
  
  <p>Thanks.</p>