From 26e9e15f6352cf14a9e1c638bc0b969e5a5ace40 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Thu, 18 May 2023 13:35:37 -0600 Subject: move from tk to ttk --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index aec2315..8b89746 100644 --- a/main.py +++ b/main.py @@ -34,7 +34,7 @@ class CompanySelector: self.master = master self.master.title("Company Selector") - self.select_file_button = tk.Button(self.master, text="Select Excel File", command=self.load_file) + self.select_file_button = ttk.Button(self.master, text="Select Excel File", command=self.load_file) self.select_file_button.pack() def load_file(self): @@ -58,10 +58,10 @@ class CompanySelector: # bind the listbox to an onselect event self.company_listbox.bind('<>', self.onselect) - self.num_companies_selected_label = tk.Label(self.master, text="0 companies selected") + self.num_companies_selected_label = ttk.Label(self.master, text="0 companies selected") self.num_companies_selected_label.pack() - self.create_pyramid_button = tk.Button(self.master, text="Create Pyramid", command=self.create_pyramid) + self.create_pyramid_button = ttk.Button(self.master, text="Create Pyramid", command=self.create_pyramid) self.create_pyramid_button.pack() def onselect(self, evt): @@ -239,4 +239,6 @@ if __name__ == "__main__": app = CompanySelector(root) if os.name != "posix": sv_ttk.set_theme("dark") + else: + sv_ttk.set_theme("dark") root.mainloop() -- cgit v1.2.3