[英]how to reverse the textbox input method in c#
I have used a code like this 我用过这样的代码
EPF_NO.PasswordChar = '*';
Now EPF_NO text box is showing ***
like that and I'm okay with that. 现在EPF_NO文本框显示为
***
,我可以接受。 but I need to get it to normal mode when I clicked on a radio button. 但是当我单击单选按钮时,我需要将其设置为正常模式。
设置EPF_NO.PasswordChar = '\\0';
You can do this by setting the property to default '0' 您可以通过将属性设置为默认的“ 0”来实现
if (toggleSwitch1.IsOn)
{
string a = EPF_NO.Text;
EPF_NO.PasswordChar = '\0';
}
else
{
EPF_NO.PasswordChar = '*';
}
嗯,类似的东西?
EPF_NO.PasswordChar = showPlainTextRadioButton.Checked ? '\0' : '*';
Add the following code in Radio button
click event 在
Radio button
单击事件中添加以下代码
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked) { textBox1.PasswordChar='\0'; }
else { textBox1.PasswordChar = '*'; }
}
use the following code: 使用以下代码:
EPF_NO.PasswordChar = '\0';
EPF_NO.UseSystemPasswordChar = false;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.