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


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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

TextCellType Class
TextCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.