I have this piece of code that will create a simple checkbox :
from Tkinter import *
CheckVar = IntVar()
self.checkbutton = Checkbutton(self.root, text = "Test", variable = CheckVar)
However this checkbox in unchecked by default and I'm searching for a way to check it.
So far I have tried to insert
CheckVar.set(1)
right after CheckVar but it didn't work.
Thanks for your help
Aucun commentaire:
Enregistrer un commentaire