[CODE]Hide and Show password

A Place For Programmers Of All Levels To Discuss Programming & Web Building.

Moderator: Community Moderator

Post Reply
User avatar
djfshady
Corporal
Corporal
Posts: 25
Joined: 26 Nov 2010, 20:12
Location: United Kingdom
Been thanked: 5 times
Contact:

[CODE]Hide and Show password

Post by djfshady »

This code will make your normal editbox text go from , 'hello' to '*****'
without brackects.

put this into a checkbox for example:

Code: Select all

edit1.PasswordChar:='*' // this will change hello to *****

Code: Select all

edit1.PasswordChar:=#0; // this will return the password from ***** to hello
And if you wanted it in an actual checkbox on your forum it would be set out like this.

Code: Select all

if checkbox1.checked = true then
edit1.passwordchar := '*'
else
edit1.PasswordChar := #0;
edit1.PasswordChar:=#0; what this basicly does is changes the text char from * back to the origenal text before the char was changed to *.

edit1.PasswordChar:='*' what this does is it makes the origenal text turn into *'s making it unreadable.
Image
Post Reply

Return to “Programming/Web Building Chat & Support”