title: How do I display a label in an edit box, but switch to password-entry mode when it receives focus?
body: <p>I use Delphi 10 and Windows 10. </p>
  
  <p>The following code makes caret and selection disappear in Edit1.</p>
  
  <pre><code>procedure TForm1.Edit1Enter(Sender: TObject);
  begin
    Edit1.PasswordChar := '*';
  end;
  </code></pre>
  
  <p>After the focus moves to the other control and in onClick it works well. </p>
  
  <p>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.</p>
  
  <p>How can I solve this?</p>