Answers for "tkinter checkbox get value"

2

python tkinter get value of checkbox

from tkinter import *

root = Tk()

value = IntVar()

example = Checkbutton(root, variable=value)
example.pack()

# 1 = clicked
# 0 = not clicked
print(value.get())

root.mainloop()
Posted by: Guest on January-02-2021
0

python tkinter checkbox default value

example = Checkbutton(root)
example.grid(row=0, column=0)
example.select()
Posted by: Guest on January-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language