Can tkinter button click not issue a leave event? -


i use tkinter leave event tell when mouse hovers away button, fine, clicking button issues leave event though mouse still hovering on button.

can configure button not issue leave event when clicking button? alternatively, can leave event handler check know mouse still on button?

sample code showing clicking button undesirably runs leave event:

#!/usr/bin/env python3 tkinter import *   def handle_click(e):     print("click")  def handle_leave(e):     print("leave")  root = tk()  b = button(root, text="button") b.pack() b.bind('<button-1>', handle_click) b.bind('<leave>', handle_leave)  root.mainloop() 


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -