-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path71_Checkbox.py
More file actions
32 lines (26 loc) · 899 Bytes
/
71_Checkbox.py
File metadata and controls
32 lines (26 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from tkinter import *
def display():
if(x.get()==1):
print("You agree!")
else:
print("You don't agree :(")
window = Tk()
x = IntVar()
python_photo = PhotoImage(file='72.5_Python.png')
check_button = Checkbutton(window,
text="I agree to something",
variable=x,
onvalue=1,
offvalue=0,
command=display,
font=("Arial",20),
fg='#00FF00',
bg='black',
activeforeground='#00FF00',
activebackground='black',
padx=25,
pady=10,
image=python_photo,
compound='left')
check_button.pack()
window.mainloop()