Check Button Demo: disabled : CheckBox « GUI Tk « Python






Check Button Demo: disabled

Check Button Demo: disabled
from Tkinter import *

class Dummy: pass
var = Dummy()

root = Tk()
root.title('Checkbutton')
for castmember, row, col, status in [
    ('A', 0,0,NORMAL), ('B', 0,1,NORMAL),
    ('C', 1,0,DISABLED), ('D', 1,1,NORMAL),
    ('E',2,0,NORMAL), ('F', 2,1,NORMAL)]:
    setattr(var, castmember, IntVar())
    Checkbutton(root, text=castmember, state=status, anchor=W,
      variable = getattr(var, castmember)).grid(row=row, column=col, sticky=W)
root.mainloop()



           
       








Related examples in the same category

1.Get check box statesGet check box states
2.Save check box statesSave check box states
3.A check box buttonA check box button
4.Add a check box to a DialogAdd a check box to a Dialog
5.Check box bar: get selected check boxCheck box bar: get selected check box
6.Border for a group of check boxesBorder for a group of check boxes