Spread Windows Forms 12.0 Product Documentation
ShowRecommendedValue Property (GcMaskCellType)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcMaskCellType Class : ShowRecommendedValue Property
Gets or sets whether to show the recommended value.
Syntax
'Declaration
 
Public Property ShowRecommendedValue As Boolean
'Usage
 
Dim instance As GcMaskCellType
Dim value As Boolean
 
instance.ShowRecommendedValue = value
 
value = instance.ShowRecommendedValue
public bool ShowRecommendedValue {get; set;}

Property Value

true to show the recommended value; otherwise, false.
The default is false.
Remarks
The value of the RecommendedValue property is shown when ShowRecommendedValue is true and the value is not fully entered; otherwise, the value of the RecommendedValue property is not shown.
Example
This example creates a GcMask cell.
GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType gcMask = new GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType();

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo mpf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\\D{3}", 3, 3);
mpf.AutoConvert = true;
mpf.BackColor = Color.Beige;
mpf.ForeColor = Color.DarkOliveGreen;
mpf.Font = SystemFonts.DefaultFont;
mpf.Name = "MaskPatternFieldInfo";
mpf.Padding = new System.Windows.Forms.Padding(3);

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo mlf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("-");
mlf.BackColor = Color.Aqua;
mlf.ForeColor = Color.Black;
mlf.Margin = new System.Windows.Forms.Padding(4);
mlf.Name = "MaskLiteralFieldInfo";

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo mlf2 = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\\D{4}", 4, 4);
mlf2.BackColor = Color.Aqua;
mlf2.ForeColor = Color.Black;
mlf2.Margin = new System.Windows.Forms.Padding(4);
mlf2.Name = "MaskLiteralFieldInfo2";

gcMask.Fields.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskFieldInfo[] { mpf, mlf, mlf2});
gcMask.PaintByControl = true;
gcMask.PromptChar = '#';
gcMask.RecommendedValue = "1234567";
gcMask.ShowRecommendedValue = true;

fpSpread1.ActiveSheet.Cells[0, 0].CellType = gcMask;
Dim gcMask As New GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType()

Dim mpf As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\D{3}", 3, 3)
mpf.AutoConvert = True
mpf.BackColor = Color.Beige
mpf.ForeColor = Color.DarkOliveGreen
mpf.Font = SystemFonts.DefaultFont
mpf.Name = "MaskPatternFieldInfo"
mpf.Padding = New System.Windows.Forms.Padding(3)

Dim mlf As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("-")
mlf.BackColor = Color.Aqua
mlf.ForeColor = Color.Black
mlf.Margin = New System.Windows.Forms.Padding(4)
mlf.Name = "MaskLiteralFieldInfo"


Dim mlf2 As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\D{4}", 4, 4)
mlf2.BackColor = Color.Aqua
mlf2.ForeColor = Color.Black
mlf2.Margin = New System.Windows.Forms.Padding(4)
mlf2.Name = "MaskLiteralFieldInfo2"

gcMask.Fields.AddRange(New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskFieldInfo() {mpf, mlf, mlf2})
gcMask.PaintByControl = True
gcMask.PromptChar = "#"
gcMask.RecommendedValue = "1234567"
gcMask.ShowRecommendedValue = True

FpSpread1.ActiveSheet.Cells(0, 0).CellType = gcMask
See Also

Reference

GcMaskCellType Class
GcMaskCellType Members
RecommendedValue Property