Spread Windows Forms 13.0 Product Documentation
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcCharMaskCellType Class / ShowRecommendedValue Property
Example


In This Topic
    ShowRecommendedValue Property (GcCharMaskCellType)
    In This Topic
    Gets or sets whether to show the recommended value.
    Syntax
    'Declaration
     
    Public Property ShowRecommendedValue As Boolean
    'Usage
     
    Dim instance As GcCharMaskCellType
    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 GcCharMask cell.
    GrapeCity.Win.Spread.InputMan.CellType.GcCharMaskCellType gc = new GrapeCity.Win.Spread.InputMan.CellType.GcCharMaskCellType();
    gc.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.CtrlArrows;
    gc.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;
    gc.AllowSpace = GrapeCity.Win.Spread.InputMan.CellType.AllowSpace.Wide;
    
    gc.CharBoxes.Clear();
    GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo litBox1 = new GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo();
    litBox1.Text = "(";
    GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo litBox2 = new GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo();
    litBox2.Text = ")";
    GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo inputBox1 = new GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo();
    GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo inputBox2 = new GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo();
    GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo inputBox3 = new GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo();
    GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo inputBox4 = new GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo();
    
    GrapeCity.Win.Spread.InputMan.CellType.SeparatorBoxInfo sepBox = new GrapeCity.Win.Spread.InputMan.CellType.SeparatorBoxInfo();
    sepBox.Shape = GrapeCity.Win.Spread.InputMan.CellType.SeparatorShape.Rectangle;
    
    gc.CharBoxes.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.CharBoxInfo[] { litBox1, inputBox1, litBox2, inputBox2, sepBox, inputBox3, inputBox4 });
    
    gc.CharBoxSpacing = 2;
    gc.ClipContent = GrapeCity.Win.Spread.InputMan.CellType.ClipContent.ExcludeLiterals;
    
    gc.ExitOnLastChar = true;
    gc.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.EditorBaseFocusCursorPosition.FirstInputPosition;
    gc.FormatString = "a9";
    gc.PaintByControl = true;
    gc.RecommendedValue = "aaaaaaaaaa";
    gc.ShowRecommendedValue = true;
    gc.UseSpreadDropDownButtonRender = true;
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = gc;
    fpSpread1.ActiveSheet.Columns[0].Width = 200;
    fpSpread1.ActiveSheet.Rows[0].Height = 40;
    Dim GC As New GrapeCity.Win.Spread.InputMan.CellType.GcCharMaskCellType()
    GC.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.CtrlArrows
    GC.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter
    GC.AllowSpace = GrapeCity.Win.Spread.InputMan.CellType.AllowSpace.Wide
    
    GC.CharBoxes.Clear()
    Dim litBox1 As New GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo()
    litBox1.Text = "("
    Dim litBox2 As New GrapeCity.Win.Spread.InputMan.CellType.LiteralBoxInfo()
    litBox2.Text = ")"
    Dim inputBox1 As New GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo()
    Dim inputBox2 As New GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo()
    Dim inputBox3 As New GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo()
    Dim inputBox4 As New GrapeCity.Win.Spread.InputMan.CellType.InputBoxInfo()
    
    Dim sepBox As New GrapeCity.Win.Spread.InputMan.CellType.SeparatorBoxInfo()
    sepBox.Shape = GrapeCity.Win.Spread.InputMan.CellType.SeparatorShape.Rectangle
    
    GC.CharBoxes.AddRange(New GrapeCity.Win.Spread.InputMan.CellType.CharBoxInfo() {litBox1, inputBox1, litBox2, inputBox2, sepBox, inputBox3, inputBox4})
    
    GC.CharBoxSpacing = 2
    GC.ClipContent = GrapeCity.Win.Spread.InputMan.CellType.ClipContent.ExcludeLiterals
    
    GC.ExitOnLastChar = True
    GC.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.EditorBaseFocusCursorPosition.FirstInputPosition
    GC.FormatString = "a9"
    GC.PaintByControl = True
    GC.RecommendedValue = "aaaaaaaaaa"
    GC.ShowRecommendedValue = True
    GC.UseSpreadDropDownButtonRender = True
    fpSpread1.ActiveSheet.Cells(0, 0).CellType = GC
    fpSpread1.ActiveSheet.Columns(0).Width = 200
    fpSpread1.ActiveSheet.Rows(0).Height = 40
    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