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

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プロパティを使用して、入力されているプレフィックスを維持されているソース内のすべての文字列のプレフィックスと比較することにより、入力文字列を自動的に完了するGcComboBoxを作成します。 これは、URL、アドレス、ファイル名、またはコマンドが頻繁に入力されるTextBoxコントロールに役立ちます。 AutoCompleteCustomSourceプロパティの使用は任意ですが、AutoCompleteCustomSourceを使用するためには、AutoCompleteSourceプロパティをCustomSourceに設定する必要があります。 AutoCompleteModeプロパティとAutoCompleteSourceプロパティは組み合わせて使用する必要があります。

使用例
次のサンプルコードは、カスタムソースを作成します。
AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();
acsc.AddRange(new string[] { "Gouda", "Swiss", "Brie" });

GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType gccombo = new GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType();
gccombo.Items.Add("Gouda");
gccombo.Items.Add("Swiss");
gccombo.Items.Add("Brie");
gccombo.AutoCompleteCustomSource = acsc;
gccombo.AutoCompleteMode = AutoCompleteMode.Suggest;
gccombo.AutoCompleteSource = AutoCompleteSource.CustomSource;
fpSpread1.Sheets[0].Cells[0, 0].CellType = gccombo;
Dim acsc = New AutoCompleteStringCollection()
acsc.AddRange(New String() {"Gouda", "Swiss", "Brie"})

Dim gccombo As New GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType()
gccombo.Items.Add("Gouda")
gccombo.Items.Add("Swiss")
gccombo.Items.Add("Brie")
gccombo.AutoCompleteCustomSource = acsc
gccombo.AutoCompleteMode = AutoCompleteMode.Suggest
gccombo.AutoCompleteSource = AutoCompleteSource.CustomSource
FpSpread1.Sheets(0).Cells(0, 0).CellType = gccombo
参照

GcComboBoxCellType クラス
GcComboBoxCellType メンバ

 

 


© MESCIUS inc. All rights reserved.