Ross Sinclair
Ross Sinclair

Reputation: 61

Tkinter entry widget 'show' option

I am coding a tkinter program whereby a user can login. I want my entry box for the password to be able to show 'Password' and then when a user starts typing I want to use the 'show' option to make it so the characters are hidden. The issue is 'show' does not update like for example the textvariable option. Is there any workaround for this?

Upvotes: 2

Views: 1417

Answers (3)

Amosein
Amosein

Reputation: 1

i had the same problem you need to bind both Enter And Leave to your entries and use config on your entry for changing show into empty string like this :

en1.config(show="")

it will show you the exact text and then again change it to "*"

Upvotes: 0

le_travie
le_travie

Reputation: 19

I use:

show="\u2022"

Upvotes: 0

Ross Sinclair
Ross Sinclair

Reputation: 61

I just figured it out, I can use entry.config(show="*") to change the state of the option while the program is running.

Upvotes: 4

Related Questions