From 9bbdd0b9853e2b40362755dda7dd73c9be17457a Mon Sep 17 00:00:00 2001 From: Tristan Smith Date: Sat, 1 Jun 2024 02:21:14 -0400 Subject: [PATCH] Added scrollbar --- gui.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 6e00655..af3866f 100644 --- a/gui.py +++ b/gui.py @@ -77,13 +77,19 @@ root.title("IP Reporter") # Create a frame for the tree view frame = tk.Frame(root) -frame.pack(padx=10, pady=10) +frame.pack(padx=10, pady=10, fill=tk.BOTH, expand=True) # Create a tree view with columns for IP and MAC columns = ("IP Address", "MAC Address") tree = ttk.Treeview(frame, columns=columns, show="headings") tree.heading("IP Address", text="IP Address") tree.heading("MAC Address", text="MAC Address") + +# Add a vertical scrollbar to the tree view +scrollbar = ttk.Scrollbar(frame, orient="vertical", command=tree.yview) +tree.configure(yscrollcommand=scrollbar.set) +scrollbar.pack(side=tk.RIGHT, fill=tk.Y) + tree.pack(fill=tk.BOTH, expand=True) # Bind double click to open in browser