Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / ComboBoxCellType Class / Editable Property
Example


In This Topic
    Editable Property (ComboBoxCellType)
    In This Topic
    Gets or sets whether you can type into the edit portion of the combo box.
    Syntax
    'Declaration
     
    Public Property Editable As Boolean
    'Usage
     
    Dim instance As ComboBoxCellType
    Dim value As Boolean
     
    instance.Editable = value
     
    value = instance.Editable
    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.
    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;
    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
    See Also