Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 26 |
Nodes: | 6 (1 / 5) |
Uptime: | 10:09:43 |
Calls: | 483 |
Calls today: | 1 |
Files: | 1,073 |
Messages: | 98,104 |
I would like to build a class ScrolledListbox, which can be packed
somewhere in ttk.Frames. What I did is to build not really a scrolled
Listbox but a Frame containing a Listbox and a Scrollbar:
class FrameScrolledListbox(ttk.Frame):[...]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# build Listbox and Scrollbar
self.Listbox = tk.Listbox(self)
self.Scrollbar = ttk.Scrollbar(self)
But it would be a bit nicer to get a class like
class ScrolledListbox(tk.Listbox):
...
So it would be used that way:
scrolledListbox = ScrolledListbox(main)
scrolledListbox.config(...)