Button TEST
import tkinter as tk
root=tk.Tk()
x=0
def func():
label.config(text='Pushed151515')
label2.config(text='Pushed')
import tkinter as tk
root=tk.Tk()
x=0
def func():
label.config(text='Pushed151515')
label2.config(text='Pushed')
def func2():
print('hey man')
global x
x=x+1
label.config(text=x)
label2.config(text='culture')
label=tk.Label(root, text='Pushed')
label.pack()
label2=tk.Label(root, text='Pushed2')
label2.pack()
button=tk.Button(root, text='Push', command=func, width=500)
button.pack()
button2=tk.Button(root, text='Push2', command=func2, width=500)
button2.pack()
root.mainloop()
def func2():
print('hey man')
global x
x=x+1
label.config(text=x)
label2.config(text='culture')
label=tk.Label(root, text='Pushed')
label.pack()
label2=tk.Label(root, text='Pushed2')
label2.pack()
button=tk.Button(root, text='Push', command=func, width=500)
button.pack()
button2=tk.Button(root, text='Push2', command=func2, width=500)
button2.pack()
root.mainloop()
'라즈베리파이 실습' 카테고리의 다른 글
라즈베리파이 CCTV 만들기 (WiFi No) (0) | 2020.11.18 |
---|---|
라즈베리파이 카메라 캡쳐 프로그램 작성 (0) | 2020.11.18 |
Camera TEST (0) | 2020.11.18 |
라즈베리파이 사물인식 프로젝트(깃허브펌) (0) | 2020.11.17 |
라즈베리파이 카메라 사물인식 링크 (0) | 2020.11.16 |