plarmi

Кликер tkinter

Apr 13th, 2025 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import tkinter
  2. # from PIL import ImageTk, Image
  3.  
  4. window = tkinter.Tk()
  5. window.geometry("1000x1000")
  6. window.title("Крутая программа")
  7. window.resizable(False, False)
  8. window.iconbitmap("icon.ico")
  9.  
  10. count = 0
  11. def print_text():
  12.     global count
  13.     count = count + 1
  14.     text1["foreground"] = "green"
  15.  
  16.  
  17. text1 = tkinter.Label(text=0, font=("Arial", 48, "bold"))
  18. text1.pack()
  19.  
  20. btn = tkinter.Button(text="НАЖМИ МЕНЯ!!!", command=print_text)
  21. btn.pack()
  22.  
  23. tkinter.mainloop()
Add Comment
Please, Sign In to add comment