「VB.NET」コンボボックス(ComboBox)の項目編集を禁止する

2021年10月1日

書式
ComboBox名.DropDownStyle = ComboBoxStyle.DropDownList

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'コンボボックスを入力不可
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'コンボボックスを入力不可 ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    'コンボボックスを入力不可
    ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList

End Sub

 

VB.net

Posted by arkgame