summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2023-05-18 13:39:45 -0600
committernavanchauhan <navanchauhan@gmail.com>2023-05-18 13:39:45 -0600
commit56af07bf7d9c1e9889878737709c90797dc05a54 (patch)
treec31ff627c245a00bb263f486c894896640efa468
parent26e9e15f6352cf14a9e1c638bc0b969e5a5ace40 (diff)
prettify
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--main.py6
-rw-r--r--poetry.lock14
-rw-r--r--pyproject.toml1
4 files changed, 19 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b5089dc..633da9b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
python-version: "3.9"
- name: Package for Windows
run: |
- pip install pyinstaller pandas xlrd openpyxl Pillow matplotlib sv_ttk
+ pip install pyinstaller pandas xlrd openpyxl Pillow matplotlib sv_ttk ttkwidgets
pyinstaller --add-data "assets;assets" --onefile -c --noconfirm main.py
- uses: actions/upload-artifact@v3
with:
diff --git a/main.py b/main.py
index 8b89746..5415974 100644
--- a/main.py
+++ b/main.py
@@ -3,6 +3,8 @@ import tkinter as tk
from tkinter import ttk
from tkinter.filedialog import askopenfilename, asksaveasfilename
+from ttkwidgets import ScrolledListbox
+
import sv_ttk
import os
@@ -48,11 +50,11 @@ class CompanySelector:
def show_companies(self):
self.select_file_button.pack_forget()
- self.company_listbox = tk.Listbox(self.master, selectmode=tk.MULTIPLE, exportselection=False, height=20)
+ self.company_listbox = ScrolledListbox(self.master, selectmode=tk.MULTIPLE, exportselection=False, height=20)
self.company_listbox.pack(expand=True)
for company in self.df["Symbol"]:
- self.company_listbox.insert(tk.END, company)
+ self.company_listbox.listbox.insert(tk.END, company)
# bind the listbox to an onselect event
diff --git a/poetry.lock b/poetry.lock
index 1a88cff..17e9a20 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -312,6 +312,17 @@ optional = false
python-versions = ">=3.7"
[[package]]
+name = "ttkwidgets"
+version = "0.13.0"
+description = "A collection of widgets for Tkinter's ttk extensions by various authors"
+category = "main"
+optional = false
+python-versions = ">=3.6"
+
+[package.dependencies]
+pillow = "*"
+
+[[package]]
name = "typing-extensions"
version = "4.5.0"
description = "Backported and Experimental Type Hints for Python 3.7+"
@@ -355,7 +366,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-co
[metadata]
lock-version = "1.1"
python-versions = ">=3.9,<3.12"
-content-hash = "a7a1966a3c5f79e737f2d79e556b59f75b2167a18ac0eab727aac3952efab93b"
+content-hash = "4131f9d85eea1c168c6737c28050f61d9b759ae94cffdbb1bbbf35eca19a6cf4"
[metadata.files]
altgraph = []
@@ -383,6 +394,7 @@ setuptools-scm = []
six = []
sv-ttk = []
tomli = []
+ttkwidgets = []
typing-extensions = []
tzdata = []
xlrd = []
diff --git a/pyproject.toml b/pyproject.toml
index fd0a237..1ff03c8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -13,6 +13,7 @@ Pillow = "^9.5.0"
matplotlib = "^3.7.1"
pyinstaller = "^5.11.0"
sv-ttk = "^2.4.5"
+ttkwidgets = "^0.13.0"
[tool.poetry.dev-dependencies]