Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

hover

import tkinter as tk

def on_enter(e):
    myButton['background'] = 'green'

def on_leave(e):
    myButton['background'] = 'SystemButtonFace'

root = tk.Tk()
myButton = tk.Button(root,text="Click Me")
myButton.grid()


myButton.bind("<Enter>", on_enter)
myButton.bind("<Leave>", on_leave)

root.mainloop()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #hover
ADD COMMENT
Topic
Name
1+6 =