I wanted to know the following;
In my program there are:
Entry1 - > where the user types some information
btn1 - > where it confirms the name and the previously entered data is displayed in the console
I wanted to know the following;
In my program there are:
Entry1 - > where the user types some information
btn1 - > where it confirms the name and the previously entered data is displayed in the console
I have. Just apply in def:
def pegar_nome():
content = var.get()
print(content)
lbl2.config(text=content)
lbl2.config (text = content)
and then change
lbl2 = Label(janela, text="")
Minimally changing, what you need to do is change this part:
# Nome do pet digitado na tela
lbl2 = Label(janela, text="")
lbl2.pack(anchor=NW)
Note that if you remove the textvariable part, the text will appear only after the button is pressed. And a few minor changes to the function you set, just add something similar to this code after print:
lbl2.config(text=content)