From 8855ad4e703ffd7481e2382cad056f333e047eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taha=20Altar=20=C3=87a=C4=9F?= Date: Fri, 21 Jul 2023 22:26:18 +0300 Subject: [PATCH] Update gui.py --- gui.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 1a34ad9..52aa4d6 100644 --- a/gui.py +++ b/gui.py @@ -19,6 +19,9 @@ def update_data_display(): label31 = [int(entry) for entry in last_entries] data_display_label.config(text="Last 3 Data Entries: " + ", ".join(map(str, label31))) + # Update the total count label + total_count_label.config(text="Total Data Count: " + str(len(data))) + def add_data_point(event): entry = data_entry_var.get().strip() try: @@ -36,6 +39,7 @@ def add_data_point(event): update_data_display() + def clear_warning(): warning_label.config(text="") # Clear the warning label @@ -71,11 +75,16 @@ def reset_data(): reset_button.pack() # Data display label to show the last 4 data entries - data_display_label = tk.Label(root, text="", fg="black", bg="grey") + data_display_label = tk.Label(root, text="", fg="black", bg="white") data_display_label.pack() + # total count label + total_count_label = tk.Label(root, text=" ", fg="red") + total_count_label.pack() + # Update the data display label initially update_data_display() + total_count_label.config(text="Total Data count: " + str(len(data))) def csv_data_entry(): csv_path = filedialog.askopenfilename(title="Select CSV file", filetypes=[("CSV files", "*.csv")])