from tkinter import *
def accao():
nome = entradaNome.get()
resultado['text'] = "Bem-vinda, " + nome + " !"
root = Tk()
root.geometry("375x150")
root.resizable(False,False)
nome_lb = Label(root , text= "Escreva o seu nome : " )
nome_lb.place(relx=0.05,rely=0.1)
entradaNome = Entry(justify='center')
entradaNome.place(relx=0.45,rely=0.13)
#
btn = Button(root , text = "Validar" , width = 25, command = accao)
btn.place(relx=0.25,rely=0.35)
resultado = Label(root , text='...........')
resultado.place(relx=0.25,rely=0.6)
Comentários
Enviar um comentário