winform怎么设置combobox不允许输入,只允许下拉中选择呢?

2025-04-23 12:12:12
推荐回答(2个)
回答1:

这样设置

comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;

回答2:

private voidcombobox_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = true;
}