Topic: Unhidden password

Good evening, I have a password hidden by stars, I would like to have a button to display the stars in normal to see if an error is not slipping when I typed it. Can you help me on this. Thanks
Sabine

Re: Unhidden password

Hi Sabine,
I did this a couple of years back - maybe it can give you some ideas.
Derek.

Post's attachments

Attachment icon show password.zip 350.75 kb, 147 downloads since 2022-11-23 

Re: Unhidden password

That's exactly what I was looking for. thank you derek.

Re: Unhidden password

Hello Sabine, Hello Derek (How are you ?)

In the same genre, I did like this (a long time ago).
But Derek's method is faster.:

This is my snippet :
procedure frm_Saisie_Image6_OnClick (Sender: TObject);   //  On affiche le mot de passe en clair
begin
    frm_Saisie.Image5.Visible     := False;
    frm_Saisie.Image6.Visible     := True;
    frm_Saisie.Image6.Left        := frm_Saisie.Image5.Left;
    frm_Saisie.Image6.Top         := frm_Saisie.Image5.Top;
    frm_Saisie.Edit4.PasswordChar := #0;
    frm_Saisie.Image5.Visible     := True;
    frm_Saisie.Image6.Visible     := False;
end;

procedure frm_Saisie_Image5_OnClick (Sender: TObject);    //  On masque le mot de passe
begin
     frm_Saisie.Image5.Visible := False;
     frm_Saisie.Image6.Visible := True;
     frm_Saisie.Edit4.PasswordChar := '*';
end;

procedure frm_Saisie_OnShow (Sender: TObject; Action: string);
begin
      frm_Saisie.Image5.Visible  := False;
      frm_Saisie.Image6.Visible  := True;
      frm_Saisie.Image5.Left     := frm_Saisie.Image6.Left;
      frm_Saisie.Image5.Top      := frm_Saisie.Image6.Top;
      frm_Saisie.Edit1.SetFocus;
end;
See attachment

JB

Post's attachments

Attachment icon Fiche.jpg 31.38 kb, 13 downloads since 2023-11-23 

Re: Unhidden password

Good evening Jean, the procedure you describe is interesting and I will put it aside for a future program.
I use Derek's which is enough for now.
Thank you for this example.
Sabine

Re: Unhidden password

In his examples, Derek always gets to the point.
My code is heavier because there are other instructions independent of the password display.
JB