다음을 통해 공유


ToolStripComboBox.AutoCompleteCustomSource 속성

정의

속성을 CustomSource설정할 때 AutoCompleteSource 사용할 사용자 지정 문자열 컬렉션을 가져오거나 설정합니다.

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

속성 값

AutoCompleteStringCollection 문자열을 포함하는 값입니다.

특성

예제

다음 코드 예제에서는 속성을 비롯한 다양한 ToolStripComboBox 속성을 설정하기 위한 구문을 보여 줍니다 AutoCompleteCustomSource .

// 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

설명

AutoCompleteCustomSource, AutoCompleteModeAutoCompleteSource 속성을 사용하여 입력되는 접두사를 유지 관리되는 원본에 있는 모든 문자열의 접두사와 비교하여 입력 문자열을 자동으로 완료하는 속성을 만듭니 ToolStripComboBox 다. URL, 주소, 파일 이름 또는 명령이 자주 입력되는 컨트롤에 유용합니다 ToolStripComboBox .

속성 사용 AutoCompleteCustomSource 은 선택 사항이지만 사용하려면 AutoCompleteCustomSource속성을 CustomSource 설정 AutoCompleteSource 해야 합니다.

AutoCompleteSource 속성을 함께 사용해야 AutoCompleteMode 합니다.

적용 대상

추가 정보