Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 42 |
Nodes: | 6 (0 / 6) |
Uptime: | 01:08:54 |
Calls: | 220 |
Calls today: | 1 |
Files: | 824 |
Messages: | 121,522 |
Posted today: | 6 |
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(...)