Giới thiệu sản phẩm
from tkinter import *
from tkinter import messagebox
window = Tk()
window.title('Instagram')
window.geometry('300x300+100+100')
def nofication_true():
messagebox.showinfo('nofication','login succesful')
def nofication_false():
messagebox.showwarning('nofication','login fail')
def check_login(user_input, pass_input):
user = "user"
passW = "123"
if user_input == user and pass_input == passW:
return True
else :
return False
def main():
label = Label(window, text='Instagram',relief ='solid',
font=('Times New Roman',8,'bold'))
label.pack()
label_user = Label(window,text='user')
label_user.pack()
entry_pass = Entry(window,bd=5,)
entry_pass.pack()
label_pass = Label(window,text='pass')
label_pass.pack()
entry_user = Entry(window,bd=5,show='*')
entry_user.pack()
def handle_login(username,password):
if check_login(username,password):
nofication_true()
else :
nofication_false()
btn = Button(window,text="login",relief ='solid',
font=('Times New Roman',8,'bold')
,width=5,height=1,fg='blue',bg='white',
command=lambda: handle_login(entry_user.get(),entry_pass.get()))
btn.pack()
window.mainloop()
main()
Hình ảnh sản phẩm

Sản phẩm cùng tác giả
Sản phẩm liên quan
Không có sản phẩm nào
quá là xịn sò luôn ạ
Đăng nhập để tham gia bình luận
Đăng nhập để tham gia bình luận
Đăng nhập để tham gia bình luận
giỏi quá ạ
Đăng nhập để tham gia bình luận
Đăng nhập để tham gia bình luận