Skip to content

Commit

Permalink
Add Scrollbars to incoming and outgoing listboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanLindeman committed Jan 21, 2015
1 parent 2368251 commit 8614eb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dtb/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ def frame_incoming(master):
# Place widgets
self.listbox_incoming = tk.Listbox(frame, selectmode=tk.EXTENDED if mac else tk.MULTIPLE)
self.listbox_incoming.grid(row=0, column=0, columnspan=3, **kw_gsp)

scroll_incoming = ttk.Scrollbar(frame, orient=tk.VERTICAL, command=self.listbox_incoming.yview)
self.listbox_incoming.configure(yscrollcommand=scroll_incoming.set)
scroll_incoming.grid(row=0, column=2, sticky=(tk.N,tk.E,tk.S))

ttk.Button(frame, text="\u21BB", width=0, command=self.update).grid(row=1, column=0, sticky=tk.SW, ipadx=5, **kw_gp)
ttk.Button(frame, text="Ignore Selected", command=self.do_ignore).grid(row=1, column=1, sticky=tk.SW, ipadx=5, **kw_gp)
ttk.Button(frame, text="Download Selected", command=self.do_download).grid(row=1, column=2, sticky=tk.SE, ipadx=5, **kw_gp)
Expand All @@ -147,6 +152,10 @@ def frame_outgoing(master):
# Place widgets
self.listbox_outgoing = tk.Listbox(frame, selectmode=tk.EXTENDED if mac else tk.MULTIPLE)
self.listbox_outgoing.grid(row=0, column=0, columnspan=3, **kw_gsp)
scroll_outgoing = ttk.Scrollbar(frame, orient=tk.VERTICAL, command=self.listbox_outgoing.yview)
self.listbox_outgoing.configure(yscrollcommand=scroll_outgoing.set)
scroll_outgoing.grid(row=0, column=2, sticky=(tk.N,tk.E,tk.S))

ttk.Button(frame, text="\u21BB", width=0, command=self.update).grid(row=1, column=0, sticky=tk.SW, ipadx=5, **kw_gp)
ttk.Button(frame, text="Remove Selected", command=self.do_remove).grid(row=1, column=1, sticky=tk.SW, ipadx=5, **kw_gp)
ttk.Button(frame, text="Share Songs...", command=self.do_share).grid(row=1, column=2, sticky=tk.SE, ipadx=5, **kw_gp)
Expand Down

0 comments on commit 8614eb2

Please sign in to comment.