Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27374

VS 2012 [RESOLVED] Toolstrip combobox select highlight

$
0
0
I have a toolstrip with a combobox. The Autocompletemode is set to "Suggest ". After the selectedindex is changed, I move to a different control. Like this,
Code:

    Private Sub LastNameToolStripComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LastNameToolStripComboBox.SelectedIndexChanged
        Dim indexnumber As Integer = Me.ProducersBindingSource.Find("ProducerId", Me.LastNameToolStripComboBox.Text.Substring(75))
        If indexnumber = -1 Then
            MessageBox.Show("Last Name Name Not Found!")
        Else
            Me.ProducersBindingSource.Position = indexnumber
            Me.FirstNameTextBox.Select()
            Me.LastNameToolStripComboBox.Text = Me.LastNameToolStripComboBox.Text.Substring(0, 65)
        End If
    End Sub

The issue is this, if I select from the drop down list, it works the way a want.
But, if I type something and then select from the "Suggest" list that pops up, the text in the Toolstrip Combobox remains highlighted, (blue). I can't figure out how to deselect the text.

Any information will be appriciated

Viewing all articles
Browse latest Browse all 27374


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>