开发者

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

开发者 https://www.devze.com 2023-01-06 20:58 出处:网络
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 doe开发者_StackOverflow社区sn\'t

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 doe开发者_StackOverflow社区sn't shows the list automatically. So in other to show the list automatically on receiving focus what should be done?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消