Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def user_login(window):
- # some code to find whether valid or not. Valid: found = True
- entry_value = entry_value.get()
- if found:
- messagebox.showinfo(title='Successful login',
- message='Valid password. Welcome to 7vinBB air traffic control system !')
- else:
- messagebox.showerror(title='Error',
- message='Invalid password. Please enter again. You have ' + str(5-count1) + ' times left')
- class LoginFrame(Frame):
- def __init__(self, master):
- super().__init__(master)
- self.entry_value = entry(self,
- font='Courier 17')
- self.login_button = button(command=lambda: user_login(root))
- self.entry_value.place(x=330, y=245)
- self.login_button.place(x=440, y=420)
- root = Tk()
- lf = LoginFrame(root)
- root.mainloop()
Add Comment
Please, Sign In to add comment