Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- window = tk.Tk()
- # Constantes do tipo string
- LOGIN_DIGITADO = tk.StringVar()
- SENHA_DIGITADA = tk.StringVar()
- def submit():
- if LOGIN_DIGITADO.get() == 'Bruno':
- tk.Label(window,
- text = 'Login Digitado').place(x = 10, y = 190)
- if SENHA_DIGITADA.get() == 'Bruno':
- tk.Label(window,
- text = 'Senha Digitada').place(x = 10, y = 210)
- submit()
- # Customizar o input do Login
- label_login = tk.Label(window, text = 'Login')
- label_login.place(x = 10, y = 10)
- login = tk.Entry(window, textvariable = LOGIN_DIGITADO)
- login.place(x = 10, y = 40)
- # Customizar o input da senha
- label_senha = tk.Label(window, text = 'Senha')
- label_senha.place(x = 10, y = 70)
- senha = tk.Entry(window, textvariable = SENHA_DIGITADA)
- senha.place(x = 10, y = 100)
- # Customizar o botão de verificar
- botao_verificar = tk.Button(window,
- text = 'verificar', command = lambda: submit())
- botao_verificar.place(x = 10, y = 130)
- # Customizar o botão de sair
- botao_sair = tk.Button(window, text = 'sair',
- command = window.destroy)
- botao_sair.place(x = 100, y = 130)
- # Customizar a window
- window.title('Área Administrativa')
- window.geometry('300x300')
- window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment