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()
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()
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()
print textbox value in tkinter
result=textExample.get("1.0","end")
print(result)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us