import tkinter as tk
def func1(even):
root['bg'] = 'green'
def func2(even):
root['bg'] = 'red'
root = tk.Tk()
root.bind('<Button-1>', func1)
root.bind('<Button-3>', func2)
root.mainloop()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import tkinter as tk
def func1(even):
root['bg'] = 'green'
def func2(even):
root['bg'] = 'red'
root = tk.Tk()
root.bind('<Button-1>', func1)
root.bind('<Button-3>', func2)
root.mainloop()