[英]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.
是否有任何属性可以设置为执行此操作,我知道如何设置TEdit在进入时保持空白但我不希望这样。 Im using Delphi XE2
我正在使用Delphi XE2
I remember from my old days in Delphi that TEdit had a property for that. 我记得在Delphi的旧时代,TEdit有一个属性。
Searching on Google, I found this 在Google上搜索,我找到了这个
Namely: "Use the PasswordChar property to create an edit control that displays a special character in place of any entered text." 即:“使用PasswordChar属性创建一个编辑控件,显示一个特殊字符代替任何输入的文本。”
I have seen that in the TEdit there is a property named PasswordChar. 我已经看到在TEdit中有一个名为PasswordChar的属性。 I assigned the * value to it and now the Edit box does not show the characters that is entered into the box
我为其分配了*值,现在编辑框中没有显示输入框中的字符
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.