Spread Windows Forms 7.0 Product Documentation
AllowSpace Property
See Also  Example Support Options
GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcTextBoxCellType Class : AllowSpace Property


Glossary Item Box

Gets or sets the allow space settings.

Syntax

Visual Basic (Declaration) 
Public Property AllowSpace As AllowSpace
Visual Basic (Usage)Copy Code
Dim instance As GcTextBoxCellType
Dim value As AllowSpace
 
instance.AllowSpace = value
 
value = instance.AllowSpace
C# 
public AllowSpace AllowSpace {get; set;}

Property Value

An AllowSpace enumeration that indicates which type of space character can be accepted.
The default is AllowSpace.Both.

Remarks

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

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

If the AutoConvert propety is true and the AllowSpace setting is AllowSpace.Wide, the control automatically converts the SBCS space to a DBCS space when user enters a SBCS space character. The other settings have similar behavior. The Format property is always used with the AllowSpace property.

Example

This example uses the AllowSpace property.
C#Copy Code
GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType datecell = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
datecell.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Cut;
fpSpread1.Sheets[0].Cells[0, 0].CellType = datecell;

GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType textcell = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
textcell.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Cut;
textcell.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.NoControl;
textcell.AllowSpace = GrapeCity.Win.Spread.InputMan.CellType.AllowSpace.Both;
fpSpread1.Sheets[0].Cells[1, 1].CellType = textcell;
VB.NETCopy Code
Dim datecell As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
datecell.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Cut
FpSpread1.Sheets(0).Cells(0, 0).CellType = datecell

Dim textcell As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
textcell.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Cut
textcell.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.NoControl
textcell.AllowSpace = GrapeCity.Win.Spread.InputMan.CellType.AllowSpace.Both
FpSpread1.Sheets(0).Cells(1, 1).CellType = textcell

Requirements

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

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.