Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 47:29:08 |
Calls: | 422 |
Files: | 1,024 |
Messages: | 90,391 |
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(...)