Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Find
- Dim index As Integer
- index = comboBox1.FindString(textBox2.Text)
- comboBox1.SelectedIndex = index
- 'Append
- comboBox1.BeginUpdate()
- Dim I As Integer
- For I = 0 To 1000
- comboBox1.Items.Add("Item 1" + i.ToString())
- Next
- comboBox1.EndUpdate()
- 'Selected
- Dim selectedIndex As Integer
- selectedIndex = comboBox1.SelectedIndex
- Dim selectedItem As Object
- selectedItem = comboBox1.SelectedItem
- MessageBox.Show("Selected Item Text: " & selectedItem.ToString() & Microsoft.VisualBasic.Constants.vbCrLf & _
- "Index: " & selectedIndex.ToString())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement