I sketched the simplest GUI with the input and output field and I want to make the output field updated in real time, without having to press any button. That is, I enter something in the input field and at the same time I see the input in the output field.

For ease of communication, here is the GUI:

from tkinter import * fenster=Tk() fenster.geometry('200x200') Eingabefeld=Entry(fenster) Ausgabefeld=Label(fenster,text="") Eingabefeld.focus() Eingabefeld.pack() Ausgabefeld.pack() mainloop() 

1 answer 1

Thanks for the advice about bind (). Solved a problem, I apply the code.

 def change(event): Ausgabefeld.config(text=Eingabefeld.get()) from tkinter import * Fenster=Tk() Fenster.geometry('200x200') Eingabefeld=Entry(Fenster) Ausgabefeld=Label(Fenster,text="Тут будет виден ваш текст") Eingabefeld.focus() Eingabefeld.pack() Ausgabefeld.pack() Eingabefeld.bind('<KeyRelease>',change) mainloop()