Home > Back-end >  How to make the content in the Edit1 enter an empty one, recorded in the other variable input??
How to make the content in the Edit1 enter an empty one, recorded in the other variable input??

Time:10-06

How to make the content in the Edit1 enter an empty one, recorded in the other variable input??
Strives for the code, I recorded in the onkeypress, always lack of a digit

CodePudding user response:

Then try keyDown

CodePudding user response:

What is an empty one, the input is not equal to not input?

CodePudding user response:

refer to the second floor sololie response:
what is an empty one, the input is not equal to not input?




Should be to let the user input can't see, back in the record, like play mahjong lost credit card instead of cash,

CodePudding user response:

When the input display *, not have to like the password, don't have to be empty?

CodePudding user response:

reference 4 floor sololie response:
when the input display *, not have to like the password, don't have to be empty:

So say.. Don't like good things!

CodePudding user response:

Make a control is not displayed.

CodePudding user response:

Edit1. PasswordChar:=# 13;
Direct access to Edit1. The Text can be

CodePudding user response:

This is to send?
 
The unit Unit1;

Interface

USES the
Winapi. Windows, Winapi Messages, System. SysUtils, System. Variants, System. Classes, Vcl. Graphics,
The Vcl. Controls, Vcl. Forms, Vcl. Dialogs, Vcl. StdCtrls;

Type
TForm1=class (TForm)
Btn1: TButton;
Edt1: TEdit;
Procedure edt1Change (Sender: TObject);
Procedure btn1Click (Sender: TObject);
Private
{Private declarations}
Public
{Public declarations}
end;

Var
Form1: TForm1;
SText: string;

Implementation

{$R *. DFM}

Procedure TForm1. Btn1Click (Sender: TObject);
The begin
ShowMessage (sText);
end;

Procedure TForm1. Edt1Change (Sender: TObject);
The begin
SText: sText +=edt1. Text;
Edt1. Text:=' ';
end;

End.

CodePudding user response:

Procedure TForm1. Edt1Change (Sender: TObject);//data change event!
The begin
Edt2. Text=edit1. TXT://is the data you want in edit2
Edit1. Text:=' ';//get data after emptying the contents of the EDIT1
end;

CodePudding user response:

Upstairs said. Using variable input record edit again buy empty,
  • Related