GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — App-Development-with-Python-using-GUI-Tools/20.Counter.py at main · sarincr/App-Development-with-Python-using-GUI-Tools Expand file tree/ Copy path20.Counter.pyMore file actions 26 lines (17 loc) · 660 Bytes / Copy path20.Counter.pyFile metadata and controls26 lines (17 loc) · 660 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 import tkinter as tk def increase(): value = int(lbl_value["text"]) lbl_value["text"] = f"{value + 1}" def decrease(): value = int(lbl_value["text"]) lbl_value["text"] = f"{value - 1}" window = tk.Tk() window.rowconfigure(0, minsize=50, weight=1) window.columnconfigure([0, 1, 2], minsize=50, weight=1) btn_decrease = tk.Button(master=window, text="-", command=decrease) btn_decrease.grid(row=0, column=0, sticky="nsew") lbl_value = tk.Label(master=window, text="0") lbl_value.grid(row=0, column=1) btn_increase = tk.Button(master=window, text="+", command=increase) btn_increase.grid(row=0, column=2, sticky="nsew") window.mainloop() |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |