import tkinter as tk

# ハンドラ関数
def clicked(event):
  if "text" in event.widget.keys():
    event.widget['text'] = 'クリックしましたね'
  if isinstance(event.widget, tk.Tk):
    print('ウインドウをクリックしました')

root = tk.Tk()
root.title('イベントドリブン')
root.geometry('250x120')

# すべてのウィジェットにハンドラ関数を設定
root.bind_all('<ButtonRelease-1>', clicked)

label_1 = tk.Label(
  root,
  text='ココをクリック')
label_1.pack(expand=True)

button_1 = tk.Button(
  root,
  text='ココをクリック')
button_1.pack(expand=True)

root.mainloop()