KoolKabin
KoolKabin

Reputation: 17653

Showing List of combobox while getting focus (vb.net)

When we click on drop down combobox control in our windows form, it shows the list automatically.

But when we press tab and navigate to that control from keyboard it doesn't shows the list automatically. So in other to show the list automatically on receiving focus what should be done?

Upvotes: 4

Views: 14681

Answers (2)

Hemal
Hemal

Reputation: 3760

I would like to mention on thing here.

I used Enter event to show Drop down list with DroppedDown=true,

But When I type something in text area of combobox and if i leave the area to next control, entered text is lost.

My combobox is databound.

Upvotes: 0

Wael Dalloul
Wael Dalloul

Reputation: 23024

Set the DroppedDown property of the combobox equal to true.

    Private Sub myComboBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles myComboBox.GotFocus
 myComboBox.DroppedDown= true
    End Sub

Upvotes: 6

Related Questions