PasswordChar Property (ATextBox)

Returns or sets the character to be displayed in place of the character typed by the user in the ATextBox object.

Syntax

Object.PasswordChar [ = sPasswordChar ]

The PasswordChar property syntax has the following parts:

 

Name

Type

Description

Object

ATextBox

ATextBox control

sPasswordChar

String

Returns or sets the character to be displayed in place of the character typed by the user.

Comments

This is normally used when the user enters a password to prevent the typed characters from being displayed on the screen. The default is "" (empty string). If the PasswordChar property is set to "", the characters are displayed as entered.

Only the first character of sPasswordChar is used.

The Property is not used when the MultiLine property is set to True. If the MultiLine property is set to True, setting the PasswordChar property will have no effect.

Example

The following statement changes the character displayed to asterisk (*) when the user enters a password:

tb1.PasswordChar="*"

Applies to

ATextBox

See Also

 

MultiLine