Spread Windows Forms 11.0 Product Documentation
AllowSpace Property (GcCharMaskCellType)
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcCharMaskCellType Class : AllowSpace Property
Gets or sets whether to allow space input.
Syntax
'Declaration
 
Public Property AllowSpace As AllowSpace
'Usage
 
Dim instance As GcCharMaskCellType
Dim value As AllowSpace
 
instance.AllowSpace = value
 
value = instance.AllowSpace
public AllowSpace AllowSpace {get; set;}

Property Value

One of the AllowSpace values.
The default is AllowSpace.Both.
Remarks

Use the AllowSpace property to specify which kind of space is allowed in the text.

If AllowSpace is None, GcCharMask does not accept spaces. The AllowSpace.Narrow mode means the SBCS space is allowed. The AllowSpace.Wide mode means the DBCS space is allowed. The AllowSpace.Both mode means all kinds of spaces are allowed.

If the AutoConvert propety is true and AllowSpace is AllowSpace.Wide, the control automatically converts the SBCS space to a DBCS space when the user enters a SBCS space character. Other settings are the same. The GcCharMask.Format property is always used with the AllowSpace property.
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.AddRange(GrapeCity.Win.Spread.InputMan.CellType.CharBoxInfoCollection.Number1);
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 = "a";     
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.AddRange(GrapeCity.Win.Spread.InputMan.CellType.CharBoxInfoCollection.Number1)
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 = "a"
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
See Also

Reference

GcCharMaskCellType Class
GcCharMaskCellType Members