Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_numbered_list_of_checkboxes.py
- from Tkinter import *
- def demo():
- vsb = Scrollbar(orient="vertical")
- text = Text(width=40, height=20, yscrollcommand=vsb.set)
- vsb.config(command=text.yview)
- vsb.pack(side="right", fill="y")
- text.pack(side="left", fill="both", expand=True)
- for i in range(100):
- cb = Checkbutton(text="checkbutton #%s" % i)
- text.window_create("end", window=cb)
- text.insert("end", "\n") # to force one checkbox per line
- root = Tk()
- demo()
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement