Spread Windows Forms 6.0 Product Documentation
Editable Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > ComboBoxCellType Class : Editable Property


Glossary Item Box

Gets or sets whether you can type into the edit portion of the combo box.

Syntax

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

Property Value

Boolean: true if editable by the end user; false otherwise

Remarks

If set to true, the end user can enter information in the cell by typing. If set to false, the end user can only interact with the drop-down list and can not type in a value directly into the cell.

If set to true, you should turn off AutoSearch, otherwise the control replaces any text entered as soon as a match with the automatic search is found.

Example

This example sets up a cell on the first sheet with a combo box with the first six months of the year and specifies the size of the portion displayed.
C#Copy Code
FarPoint.Win.Spread.CellType.ComboBoxCellType cmbocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
cmbocell.Items = (new String[] {"January", "February", "March", "April", "May", "June"});
cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter;
cmbocell.Editable = true;
cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left;
cmbocell.ListOffset = 20;
cmbocell.ListWidth = 0;
cmbocell.MaxDrop = 4;
fpSpread1.Sheets[1].Cells[2,2].CellType = cmbocell;
Visual BasicCopy Code
Dim cmbocell As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
cmbocell.Items = (new String() {"January", "February", "March", "April", "May", "June"})
cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter
cmbocell.Editable = True
cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left
cmbocell.ListOffset = 20
cmbocell.ListWidth = 0
cmbocell.MaxDrop = 4
fpSpread1.Sheets(1).Cells(2,2).CellType = cmbocell

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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