Tkinter Entry als *?

1 Antwort

Das Entry-Widget hat auch eine Option show, die man entsprechend setzen kann.

Controls how to display the contents of the widget. If non-empty, the widget displays a string of characters instead of the actual contents. To get a password entry widget, set this option to “*”. (show/Show)

Quelle

Beispiel:

from tkinter import *

root = Tk()
entry = Entry(root, show="*")
entry.place(x=10, y=10)
root.mainloop()

Nachträglich kann man den Wert von show auch wieder ändern:

entry.config(show="");
Gamer007442 
Fragesteller
 11.12.2019, 19:58

vielen herzlichen dank!

0