Spread Windows Forms 9.0 Product Documentation
AcceptsCrLf Property (GcDateTimeCellType)
Example 


Gets or sets a value that indicates how to process the CrLf characters when copying, cutting, or pasting the string.
Syntax
'Declaration
 
Public Property AcceptsCrLf As CrLfMode
'Usage
 
Dim instance As GcDateTimeCellType
Dim value As CrLfMode
 
instance.AcceptsCrLf = value
 
value = instance.AcceptsCrLf
public CrLfMode AcceptsCrLf {get; set;}

Property Value

A CrLfMode enumeration that indicates which mode the CrLf characters use when copying, cutting, and pasting the string.
The default is CrLfMode.NoControl.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe value is not a valid CrLfMode item.
Remarks
The CrLf.Cut setting causes the GcDateTime to be similar to the standard TextBox when copying, cutting, and pasting the string.
Example
This example uses the AcceptsCrLf property.
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;
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 Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

GcDateTimeCellType Class
GcDateTimeCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.