combobox控件 ComboBox控件用于获取或设置当前选中项的索引的属性是


combobox控件 ComboBox控件用于获取或设置当前选中项的索引的属性是

文章插图
大家好,小跳来为大家解答以上的问题 。ComboBox控件用于获取或设置当前选中项的索引的属性是,combobox控件这个很多人还不知道,现在让我们一起来看看吧!
1、VB combo 随输入内容 调整下拉框Option ExplicitDim namestr()Private Sub Form_Load() ReDim namestr(1 To 5) namestr(1) = "陈好" namestr(2) = "陈很好" namestr(3) = "陈特好" namestr(4) = "陈贼好" namestr(5) = "陈好不好"End SubPrivate Sub Combo1_Change() Static a As Boolean If a Then Exit SubDim i As Integer Dim p As Integer Dim s As Stringa = True If Combo1.Text = "" Then Exit Sub p = Combo1.SelStart s = Combo1.TextCombo1.Clear For i = 1 To 5If InStr(1, namestr(i), s) = 1 Then Combo1.AddItem namestr(i) Next i Combo1.Text = s Combo1.SelStart = p a = FalseEnd Sub 。
【combobox控件 ComboBox控件用于获取或设置当前选中项的索引的属性是】本文到此分享完毕 , 希望对大家有所帮助 。