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


Glossary Item Box

Gets or sets whether the maximum number of characters allowed in the control are handled based on bytes, characters, or text elements.

Syntax

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

Property Value

The value is true if the MaxLength is based on byte; otherwise, based on character.
The default is LengthUnit.Char.

Remarks

Determines the unit for counting the GcTextBox.MaxLength property. The value LengthUnit.Byte means the MaxLength is counted by bytes. The value LengthUnit.Char means the MaxLength is counted by characters. The value LengthUnit.TextElement means the MaxLength is counted by text elements.

Example

This example uses the MaxLengthUnit property.
C#Copy Code
GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType inputcell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
inputcell1.MaxLengthUnit = GrapeCity.Win.Spread.InputMan.CellType.LengthUnit.Char;
inputcell1.MaxLength = 10;
fpSpread1.Sheets[0].Cells[1, 1].CellType = inputcell1;
VB.NETCopy Code
Dim inputcell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType
inputcell1.MaxLengthUnit = GrapeCity.Win.Spread.InputMan.CellType.LengthUnit.Char
inputcell1.MaxLength = 10
FpSpread1.Sheets(0).Cells(1, 1).CellType = inputcell1

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.