MESCIUS SPREAD for Windows Forms 15.0J
AutoCompleteCustomSource プロパティ (GcTextBoxCellType)
使用例 

AutoCompleteSourceプロパティがCustomSourceに設定されている場合に使用される、カスタムのSystem.Windows.Forms.AutoCompleteStringCollectionを取得または設定します。
構文
'宣言
 
Public Property AutoCompleteCustomSource As AutoCompleteStringCollection
public AutoCompleteStringCollection AutoCompleteCustomSource {get; set;}

プロパティ値

AutoCompleteSourceで使用するSystem.Windows.Forms.AutoCompleteStringCollection
デフォルト値はnull 参照 (Visual Basicでは Nothing)です。
解説

AutoCompleteCustomSourceAutoCompleteMode、およびAutoCompleteSourceプロパティを使用して、入力されているプレフィックスを維持されているソース内のすべての文字列のプレフィックスと比較することにより、入力文字列を自動的に完了するGcTextBoxを作成します。 これは、URL、アドレス、ファイル名、またはコマンドが頻繁に入力されるTextBoxコントロールに役立ちます。

AutoCompleteCustomSourceプロパティの使用は任意ですが、AutoCompleteCustomSourceを使用するためには、AutoCompleteSourceプロパティをCustomSourceに設定する必要があります。

AutoCompleteModeプロパティとAutoCompleteSourceプロパティは組み合わせて使用する必要があります。

使用例
次のサンプルコードは、AutoCompleteCustomSourceプロパティを使用します。
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
参照

GcTextBoxCellType クラス
GcTextBoxCellType メンバ

 

 


© MESCIUS inc. All rights reserved.