vb中combol怎么在list中显示选定的内容?
1个回答
展开全部
Private Sub Combo1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If Combo1.Text = List1.List(i) Then
List1.ListIndex = i
End If
Next
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 10
Combo1.AddItem "xx" & i
List1.AddItem "xx" & i
Next
End Sub
Dim i As Integer
For i = 0 To List1.ListCount - 1
If Combo1.Text = List1.List(i) Then
List1.ListIndex = i
End If
Next
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 10
Combo1.AddItem "xx" & i
List1.AddItem "xx" & i
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |