Answers for "how to make checkbutton to click one in tkinter"

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
3

chech box in tkinter

from tkinter import *
master = Tk()
var1 = IntVar()
Checkbutton(master, text="male", variable=var1).grid(row=0, sticky=W)
var2 = IntVar()
Checkbutton(master, text="female", variable=var2).grid(row=1, sticky=W)
mainloop()
Posted by: Guest on May-05-2020

Code answers related to "how to make checkbutton to click one in tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language