在获得焦点时显示组合框列表(vb.net)

前端之家收集整理的这篇文章主要介绍了在获得焦点时显示组合框列表(vb.net)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我们在 Windows窗体中单击下拉组合框控件时,它会自动显示列表.

但是当我们按Tab键并从键盘导航到该控件时,它不会自动显示列表.那么在其他方面,在接收焦点时自动显示列表应该做什么?

解决方法

将组合框的DroppedDown属性设置为true.

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

猜你在找的VB相关文章