本文整理汇总了VB.NET中System.Windows.Forms.TextBox.AutoCompleteMode属性的典型用法代码示例。如果您正苦于以下问题:VB.NET TextBox.AutoCompleteMode属性的具体用法?VB.NET TextBox.AutoCompleteMode怎么用?VB.NET TextBox.AutoCompleteMode使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.AutoCompleteMode属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: AutoCompleteStringCollection
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
' Create the list to use as the custom source.
Dim MySource As New AutoCompleteStringCollection()
MySource.AddRange(New String() _
{ _
"January", _
"February", _
"March", _
"April", _
"May", _
"June", _
"July", _
"August", _
"September", _
"October", _
"November", _
"December" _
})
' Create and initialize the text box.
Dim MyTextBox As New TextBox()
With MyTextBox
.AutoCompleteCustomSource = MySource
.AutoCompleteMode = AutoCompleteMode.SuggestAppend
.AutoCompleteSource = AutoCompleteSource.CustomSource
.Location = New Point(20, 20)
.Width = Me.ClientRectangle.Width - 40
.Visible = True
End With
' Add the text box to the form.
Me.Controls.Add(MyTextBox)
End Sub