2012-10-04 82 views
0

如果組合框的下拉樣式爲「dropwdownlist」,如何清除或刷新Visual Basic 2008中的組合框?如果樣式是「下拉式」,我可以刷新組合框,但是當我將其更改爲「dropdownlist」時,我無法清除它/清除vb 2008中的組合框

這是即時消息用於清除文本的代碼。

End With 
    With cmbItemType 
     cmbItemType.ResetText() 
    End With 

回答

0

設置selectedindex爲-1

在你的情況下,它應該是cmbItemType.SelectedIndex = -1