I use Delphi 10 and Windows 10.
The following code makes caret and selection disappear in Edit1.
procedure TForm1.Edit1Enter(Sender: TObject);
begin
Edit1.PasswordChar := '*';
end;
After the focus moves to the other control and in onClick it works well.
I can't use onClick because the focus moves by tab key and the Edit1 should start with default #0 because it holds text which is 'password' before the focus enters.
How can I solve this?
The edit control works as designed and as expected.
TEdit.PasswordChar
in the OI or on creation or ... but not every time you enter the controlTEdit.TextHint
property which will be shown if TEdit.Text
is empty and the control is not focused