diff options
author | navanchauhan <navanchauhan@gmail.com> | 2023-05-19 09:01:33 -0600 |
---|---|---|
committer | navanchauhan <navanchauhan@gmail.com> | 2023-05-19 09:01:33 -0600 |
commit | b7e41f53e0c18b401166d02712785ada18c0cd21 (patch) | |
tree | 6d66eec792b36435e224012310948864802e823d | |
parent | 32a156dfde22f03c9ed2117909689cd99690efa9 (diff) |
fix scroll-listbox
-rw-r--r-- | main.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -58,7 +58,7 @@ class CompanySelector: # bind the listbox to an onselect event - self.company_listbox.bind('<<ListboxSelect>>', self.onselect) + self.company_listbox.listbox.bind('<<ListboxSelect>>', 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")]) |