Spread Windows Forms 11.0 Product Documentation
CharFormatValidator Constructor()
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > CharFormatValidator Class > CharFormatValidator Constructor : CharFormatValidator Constructor()
Initializes a new instance of the CharFormatValidator class.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New CharFormatValidator()
public CharFormatValidator()
Example
This example creates a character format validator.
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Aqua;
FarPoint.Win.Spread.CharFormatValidator cFormatValidator1 = new FarPoint.Win.Spread.CharFormatValidator();
cFormatValidator1.Format = "Aa";
cFormatValidator1.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), cFormatValidator1);
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Aqua
Dim charFormatValidator1 As New FarPoint.Win.Spread.CharFormatValidator()
charFormatValidator1.Format = "Aa"
charFormatValidator1.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), charFormatValidator1)
See Also

Reference

CharFormatValidator Class
CharFormatValidator Members
Overload List