G
goldtech
Hi,
I'm stumped on how to have a scrollbar with a long list of checkboxes.
Given code like:
from Tkinter import *
root = Tk()
states = []
for i in range(150):
var = IntVar()
chk = Checkbutton(root, text=str(i), variable=var)
chk.grid(sticky=W)
states.append(var)
root.mainloop()
print map((lambda var: var.get()), states)
I've tried adding this to a frame then adding the frame to a canvas
and it gets complicated rather quickly...
Is there a simple way to add a scroll bar?
Thanks
I'm stumped on how to have a scrollbar with a long list of checkboxes.
Given code like:
from Tkinter import *
root = Tk()
states = []
for i in range(150):
var = IntVar()
chk = Checkbutton(root, text=str(i), variable=var)
chk.grid(sticky=W)
states.append(var)
root.mainloop()
print map((lambda var: var.get()), states)
I've tried adding this to a frame then adding the frame to a canvas
and it gets complicated rather quickly...
Is there a simple way to add a scroll bar?
Thanks