Skip to content

Commit

Permalink
Update gui.py
Browse files Browse the repository at this point in the history
  • Loading branch information
altarcag authored Jul 21, 2023
1 parent 3bb7de6 commit 8855ad4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -36,6 +39,7 @@ def add_data_point(event):

update_data_display()


def clear_warning():
warning_label.config(text="") # Clear the warning label

Expand Down Expand Up @@ -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")])
Expand Down

0 comments on commit 8855ad4

Please sign in to comment.