Spread Windows Forms 10.0 Product Documentation
AutoCompleteMode Property (GcTextBoxCellType)
Example 


Gets or sets an option that controls how automatic completion works for the GcTextBox control.
Syntax
'Declaration
 
Public Property AutoCompleteMode As AutoCompleteMode
'Usage
 
Dim instance As GcTextBoxCellType
Dim value As AutoCompleteMode
 
instance.AutoCompleteMode = value
 
value = instance.AutoCompleteMode
public AutoCompleteMode AutoCompleteMode {get; set;}

Property Value

One of the GcTextBox.AutoCompleteMode values. The values are AutoAppend, AutoSuggest, AutoSuggestAppend, and None.
The default is None.
Remarks

Use the GcTextBox.AutoCompleteCustomSource, AutoCompleteMode, and GcTextBox.AutoCompleteSource properties to create a GcTextBox that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for GcTextBox controls in which URLs, addresses, file names, or commands are frequently entered.

The use of the AutoCompleteCustomSource property is optional, but you must set the AutoCompleteSource property to CustomSource in order to use AutoCompleteCustomSource.

You must use the AutoCompleteMode and AutoCompleteSource properties together.

Example
This example uses the AutoCompleteMode property.
GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType inputcell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
inputcell1.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;            
inputcell1.DisplayAlignment = GrapeCity.Win.Spread.InputMan.CellType.DisplayAlignment.Distributed;
AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();
acsc.AddRange(new string[] { "One", "Two", "Three", "Four" });
inputcell1.AutoCompleteCustomSource  = acsc;
inputcell1.AutoCompleteMode = AutoCompleteMode.Suggest;
inputcell1.AutoCompleteSource = AutoCompleteSource.CustomSource;
fpSpread1.Sheets[0].Cells[1, 1].CellType = inputcell1;
Dim inputcell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType
inputcell1.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
inputcell1.DisplayAlignment = GrapeCity.Win.Spread.InputMan.CellType.DisplayAlignment.Distributed
Dim acsc As New AutoCompleteStringCollection
acsc.AddRange(New String() {"One", "Two", "Three", "Four"})
inputcell1.AutoCompleteCustomSource = acsc
inputcell1.AutoCompleteMode = AutoCompleteMode.Suggest
inputcell1.AutoCompleteSource = AutoCompleteSource.CustomSource
FpSpread1.Sheets(0).Cells(1, 1).CellType = inputcell1
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

GcTextBoxCellType Class
GcTextBoxCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.