added statusbar with stringvar

This commit is contained in:
2025-04-27 00:24:30 +02:00
parent d16aefe20f
commit aec7770e74

View File

@@ -42,6 +42,9 @@ class Application:
self.json_file = os.path.join(self.json_path, self.json_file_name) self.json_file = os.path.join(self.json_path, self.json_file_name)
self.csv_file = os.path.join(self.csv_path, self.csv_file_name) self.csv_file = os.path.join(self.csv_path, self.csv_file_name)
# status bar content
self.statusbar = tk.StringVar()
# leave application if settings are bad # leave application if settings are bad
if not self.config_good: if not self.config_good:
show_error(message_title="Fehler Konfiguration", show_error(message_title="Fehler Konfiguration",
@@ -55,6 +58,8 @@ class Application:
top_frame.pack(side=tk.TOP, fill=tk.X) top_frame.pack(side=tk.TOP, fill=tk.X)
data_frame = tk.Frame(self.root, bg="teal") data_frame = tk.Frame(self.root, bg="teal")
data_frame.pack(side=tk.TOP, fill=tk.BOTH, expand=True) data_frame.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
bottom_frame = tk.Frame(self.root)
bottom_frame.pack(side=tk.BOTTOM, fill=tk.X)
# top buttons # top buttons
button_width = 8 button_width = 8
@@ -83,6 +88,9 @@ class Application:
self.table.bind("<Return>", self.mouse_click_double) self.table.bind("<Return>", self.mouse_click_double)
self.table.bind("<Double-1>", self.mouse_click_double) self.table.bind("<Double-1>", self.mouse_click_double)
# bottom status bar
tk.Label(bottom_frame, textvariable=self.statusbar).pack(side=tk.LEFT)
self._load_json_file() self._load_json_file()
self.root.mainloop() self.root.mainloop()