-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTkinter_button.py
50 lines (41 loc) · 937 Bytes
/
Tkinter_button.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from tkinter import *
# fd=Tk()
#
# F1=Frame(fd)
# F1.pack()
#
# #creating a button and print an output in the console
#
# def login():
# print('Logoin Successfully')
#
# def logout():
# print('Logout Successfully')
#
# Button(F1,text='Login',bg='green',command=login).pack()
# Button(F1,text='Logout',bg='red',command=logout).pack()
#
# fd.mainloop()
#=============================================================
# from tkinter import messagebox
#
# tp=Tk()
# tp.geometry('500x500')
#
# def Hello():
# mg=messagebox.showinfo('Python','Hello Python')
#
# Button(tp,text='Hello',command=Hello).place(x=100,y=50)
#
# tp.mainloop()
#===========================================================
root=Tk()
f=Frame(root)
f.pack()
def login():
print('Login Successful')
def logout():
print('Logout Successful')
Button(f,text='login',command=login).pack()
Button(f,text='logout',command=quit).pack()
root.mainloop()