summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2023-05-19 09:01:33 -0600
committernavanchauhan <navanchauhan@gmail.com>2023-05-19 09:01:33 -0600
commitb7e41f53e0c18b401166d02712785ada18c0cd21 (patch)
tree6d66eec792b36435e224012310948864802e823d /main.py
parent32a156dfde22f03c9ed2117909689cd99690efa9 (diff)
fix scroll-listbox
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files 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('<<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")])