Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a TEdit box to enter password without showing the characters that is bing entered and only showing a *

I want to make an edit box where an user must enter a password. When they enter the password I want the character not to be displayed, and rather an *. Are there any properties that can be set to do this, I know how to set the TEdit to remain blank while entering but I do not want that. Im using Delphi XE2

like image 912
Japster Avatar asked Dec 02 '22 22:12

Japster


2 Answers

I remember from my old days in Delphi that TEdit had a property for that.

Searching on Google, I found this

Namely: "Use the PasswordChar property to create an edit control that displays a special character in place of any entered text."

like image 104
PCaetano Avatar answered Dec 18 '22 08:12

PCaetano


I have seen that in the TEdit there is a property named PasswordChar. I assigned the * value to it and now the Edit box does not show the characters that is entered into the box

like image 23
Japster Avatar answered Dec 18 '22 09:12

Japster