Spread Windows Forms 12.0 Product Documentation
PasswordChar Property (TextCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > TextCellType Class : PasswordChar Property
Gets or sets the character for masking data in the text cell.
Syntax
'Declaration
 
Public Property PasswordChar As Char
'Usage
 
Dim instance As TextCellType
Dim value As Char
 
instance.PasswordChar = value
 
value = instance.PasswordChar
public char PasswordChar {get; set;}

Property Value

Character containing the character for masking the password
Remarks

This property lets you set which character to substitute in the display of the cell contents when a user types in a password. When this property is set, the display of the formatted data (Text property) appears to be replaced with the password character but the unformatted data (Value property) contains the actual text string.

The PasswordChar property has no effect when the Multiline property is set to true. Refer to the TextBox.PasswordChar property in the .NET Framework Reference documentation for more information.

Example
This example specifies a password character that replaces all the text characters when displayed. The value of the cell is the text string, though it is not visible.
FarPoint.Win.Spread.CellType.TextCellType txt = new FarPoint.Win.Spread.CellType.TextCellType();
txt.PasswordChar = Convert.ToChar("+");
fpSpread1.Sheets[0].Cells[0, 0].CellType = txt;
fpSpread1.Sheets[0].Cells[0, 0].Text = "This is a text cell.";
fpSpread1.Sheets[0].Columns[0].Width = 200; 
Dim txt As New FarPoint.Win.Spread.CellType.TextCellType()
txt.PasswordChar = "+"
FpSpread1.Sheets(0).Cells(0, 0).CellType = txt
FpSpread1.Sheets(0).Cells(0, 0).Text = "This is a text cell."
FpSpread1.Sheets(0).Columns(0).Width = 200
See Also

Reference

TextCellType Class
TextCellType Members