On a scrollbar for tkinter

Vlastimil Brom vlastimil.brom at gmail.com
Fri Jan 3 06:00:05 EST 2014


2014/1/3  <eneskristo at gmail.com>:
> @Rick
> I found some solutions for python 2.x, but still, as I am with the future, I need a futuristic solution or 2, so if anyone else could help me, I'd be grateful!
> --

Hi,
I usually don't use tkinter myself, hence others may have more
idiomatic suggestions,
but you can of course use ScrolledWindow  tix with python3; cf.:

from tkinter import tix

root = tix.Tk()
root.title("scrolled window")
root.geometry("50x500+50+50")
sw= tix.ScrolledWindow(root)
sw.pack(fill=tix.BOTH, expand=1)
for i in range(1,101):
    cb = tix.Checkbutton(sw.window, text=str(i))
    cb.pack(fill=tix.BOTH, expand=0)
root.mainloop()

hth,
  vbr



More information about the Python-list mailing list