# -*- coding: utf-8 -*- import tkinter as tk root = tk.Tk() root.title("tk7.py") root.geometry("100x100") ##################################### def hello(event): lb.config(text = 'Hello!') def dClick(event): lb.config(text = "You just double click") btn = tk.Button(root, text = "Click", \ borderwidth = 10, bg = '#0000ff', \ fg = 'yellow') lb = tk.Label(root, text = 'A Label', fg = 'darkgreen') btn.pack() btn.bind('',hello) btn.bind('',dClick) lb.pack() ##################################### root.mainloop()