-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckboxes.py
More file actions
32 lines (27 loc) · 924 Bytes
/
Copy pathcheckboxes.py
File metadata and controls
32 lines (27 loc) · 924 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()
#python_photo = PhotoImage(file='python_photo.jpeg')
x = IntVar()
check_button = Checkbutton(window,
text="I agree to do something",
variable=x,
onvalue=1,
offvalue=0,
command=display,
font=("Arial",20),
fg="cyan",
bg="black",
activeforeground="cyan",
activebackground="black",
padx=25,
pady=10,
#image=python_photo,
#compound="top"
)
check_button.pack()
window.mainloop()