Spread 8.0 Documentation
TypeMaxEditLen Property
Support Options
ActiveX Reference > ActiveX Properties > TypeMaxEditLen Property

Glossary Item Box

TypeMaxEditLen Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the maximum number of characters users can enter in an edit cell or in the edit field of a combo box cell. This property is available at run time only.

Syntax

C++

short CSpreadSheet::GetTypeMaxEditLen( )
void CSpreadSheet::SetTypeMaxEditLen(short value)

Visual Basic

[form.]fpSpread.TypeMaxEditLen[ = value%]

Remarks

The default value for the TypeMaxEditLen property is 32000 characters for an edit cell and 150 characters for a combo box cell.

A beep sounds to notify the user when the maximum number of characters is reached (unless the NoBeep property is set to True), and the control prevents the user from typing more characters. If the user tries to paste in a value with more characters than the allowed amount, or such a value is provided through code or from a database, the value is truncated to the number of allowed characters. The edit cell can have unlimited characters; however, the number of characters may be limited by the work station resources.

If you are binding the fpSpread control to a database and the DAutoCellTypes property is set to True, set the TypeMaxEditLen property to a larger value in response to the DataColConfig event to provide text cells that can accommodate the data from the text fields being read from the database.

To use the TypeMaxEditLen property, specify the sheet with which you want to work by setting the Sheet property. Then specify the cell or cells to which to apply the property, as described in Using Column and Row Properties. Once you set the TypeMaxEditLen property for an edit cell or cells, any subsequent edit cells you create will use the same TypeMaxEditLen setting unless you reset it for those cells.

The TypeMaxEditLen property does not have an effect unless the CellType property is set to 1 (Edit) or 8 (Combo Box) for the specified cell or cells.

Spread Designer

Choose the Cell menu, the Cell Type menu, the Combo Box menu, and then the Settings tab, and then choose or type a number in the Text Length spin box in the Cell Type Settings dialog box. Choose the Cell menu, the Cell Type menu, the Edit menu, and then the Settings tab, and then choose or type a number in the Length spin box in the Cell Type Settings dialog box.

Data Type

Integer

See Also

Creating and Setting up a Combo Box Cell
Limiting User Entry in an Edit Cell
Connecting to a Database Using Default Settings
Sizing Columns in Bound Sheets

CellType, DAutoCellTypes, NoBeep, Sheet, TypeComboBoxEditable, TypeComboBoxString, TypeComboBoxWidth, TypeEditMultiLine properties

DataColConfig event

DLL Correspondence

SSSetTypeComboBoxEx, SSSetTypeEdit functions

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