From b7e41f53e0c18b401166d02712785ada18c0cd21 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Fri, 19 May 2023 09:01:33 -0600 Subject: fix scroll-listbox --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5415974..e022f18 100644 --- a/main.py +++ b/main.py @@ -58,7 +58,7 @@ class CompanySelector: # bind the listbox to an onselect event - self.company_listbox.bind('<>', self.onselect) + self.company_listbox.listbox.bind('<>', self.onselect) self.num_companies_selected_label = ttk.Label(self.master, text="0 companies selected") self.num_companies_selected_label.pack() @@ -72,7 +72,7 @@ class CompanySelector: self.num_companies_selected_label.config(text=f"{num_selected} companies selected") def create_pyramid(self): - selected_companies = [self.company_listbox.get(index) for index in self.company_listbox.curselection()] + selected_companies = [self.company_listbox.listbox.get(index) for index in self.company_listbox.listbox.curselection()] selected_df = self.df[self.df["Symbol"].isin(selected_companies)].sort_values(by="Weighting", ascending=False) #pyramid_file_path = asksaveasfilename(defaultextension=".xlsx", filetypes=[("Excel files", "*.xlsx *.xls")]) -- cgit v1.2.3