0
  1. Sorry for my bad english
  2. I want a Cps test where by every click on a Button a Counter goes 1 up. I had made some Code but it didn“t worke please help me:
import tkinter as tk
from time import time

Cpp = 0

clicks = []

def clicked(Cpp):
    Cpp+=1

    cps = ("Cps: "+ str(Cpp))
    frame_label = tk.Frame()
    text = tk.Label(master=frame_label, text=cps)
    text.pack()
    frame_label.place(x=0, y=29)

root = tk.Tk()
button = tk.Frame
button = tk.Button(root, text='Click', command=clicked(Cpp)).pack(padx=5, pady=12)

tk.mainloop()

enter image description here

It shoul look like this:

Bryan Oakley
  • 341,422
  • 46
  • 489
  • 636

0 Answers0