Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- import tkinter.ttk as ttk
- root = tk.Tk()
- checked = tk.IntVar()
- checked.set(1)
- unchecked = tk.IntVar()
- unchecked.set(0)
- # check-dc.gif
- check_dc = ttk.Checkbutton(root, state='disabled', variable=checked)
- check_dc.grid(row=0, column=0)
- # check-du.gif
- check_du = ttk.Checkbutton(root, state='disabled', variable=unchecked)
- check_du.grid(row=0, column=1)
- #
- check_nc = ttk.Checkbutton(root, state='normal', variable=checked)
- check_nc.grid(row=0, column=2)
- #
- check_nu = ttk.Checkbutton(root, state='normal', variable=unchecked)
- check_nu.grid(row=0, column=3)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement