C#组合框下拉样式:在编辑文本时防止选择值 [英] C# Combobox Dropdown style: prevent selecting value when editing text

查看:311
本文介绍了C#组合框下拉样式:在编辑文本时防止选择值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个下拉样式组合框,并且键入了一个不在列表中但与列表中的值的开头匹配的值,那么当我单击下拉箭头时,将选择该值.例如,如果我键入13,并且130在列表中,那么如果我单击下拉箭头,则会选择130.有什么方法可以防止这种情况?

If I have a dropdown style combobox, and I type in a value which isn''t in the list but matches the start of a value in the list, then that value gets selected when I click the dropdown arrow. Eg If I type in 13, and 130 is in the list, then 130 is selected if I click the dropwdown arrow. Is there any way to prevent this?

推荐答案

您是否尝试过更改
Have you tried changing the AutoCompleteMode[^]


AutoCompleteMode是默认设置,我认为是None
AutoCompleteMode is the default, which is None, I think


这篇关于C#组合框下拉样式:在编辑文本时防止选择值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆