Share via


ToolStripComboBox.AutoCompleteCustomSource Özellik

Tanım

özelliği olarak ayarlandığında CustomSourcekullanılacak AutoCompleteSource özel dize koleksiyonunu alır veya ayarlar.

public:
 property System::Windows::Forms::AutoCompleteStringCollection ^ AutoCompleteCustomSource { System::Windows::Forms::AutoCompleteStringCollection ^ get(); void set(System::Windows::Forms::AutoCompleteStringCollection ^ value); };
[System.ComponentModel.Browsable(true)]
public System.Windows.Forms.AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
[<System.ComponentModel.Browsable(true)>]
member this.AutoCompleteCustomSource : System.Windows.Forms.AutoCompleteStringCollection with get, set
Public Property AutoCompleteCustomSource As AutoCompleteStringCollection

Özellik Değeri

AutoCompleteStringCollection Dizeleri içeren bir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, özelliği de dahil olmak üzere çeşitli ToolStripComboBox özellikleri ayarlamaya yönelik söz dizimini AutoCompleteCustomSource gösterir.

// The following code example demonstrates the syntax for setting
// various ToolStripComboBox properties.
// 
toolStripComboBox1.AutoCompleteCustomSource.AddRange(new string[] {
"aaa",
"bbb",
"ccc"});
toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
toolStripComboBox1.DropDownHeight = 110;
toolStripComboBox1.DropDownWidth = 122;
toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
toolStripComboBox1.IntegralHeight = false;
toolStripComboBox1.Items.AddRange(new object[] {
"xxx",
"yyy",
"zzz"});
toolStripComboBox1.MaxDropDownItems = 9;
toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert;
toolStripComboBox1.Name = "toolStripComboBox1";
toolStripComboBox1.Size = new System.Drawing.Size(121, 25);
toolStripComboBox1.Sorted = true;
' The following code example demonstrates the syntax for setting
' various ToolStripComboBox properties.
' 
toolStripComboBox1.AutoCompleteCustomSource.AddRange(New String() {"aaa", "bbb", "ccc"})
toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
toolStripComboBox1.DropDownHeight = 110
toolStripComboBox1.DropDownWidth = 122
toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard
toolStripComboBox1.IntegralHeight = False
toolStripComboBox1.Items.AddRange(New Object() {"xxx", "yyy", "zzz"})
toolStripComboBox1.MaxDropDownItems = 9
toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert
toolStripComboBox1.Name = "toolStripComboBox1"
toolStripComboBox1.Size = New System.Drawing.Size(121, 25)
toolStripComboBox1.Sorted = True

Açıklamalar

Girilen ön eki bakımlı AutoCompleteCustomSourcebir ToolStripComboBox kaynaktaki tüm dizelerin ön ekleriyle karşılaştırarak giriş dizelerini otomatik olarak tamamlayan bir oluşturmak için , AutoCompleteModeve AutoCompleteSource özelliklerini kullanın. Bu, URL'lerin, adreslerin, dosya adlarının veya komutların sık girileceği denetimler için ToolStripComboBox kullanışlıdır.

özelliğinin AutoCompleteCustomSource kullanımı isteğe bağlıdır, ancak özelliğini kullanmak AutoCompleteCustomSourceiçin olarak ayarlamanız AutoCompleteSourceCustomSource gerekir.

ve AutoCompleteSource özelliklerini birlikte kullanmanız AutoCompleteMode gerekir.

Şunlara uygulanır

Ayrıca bkz.