ComboBox,DropDownStyle:DropDown,带文本 - 如何取消选择文本? [英] ComboBox, DropDownStyle: DropDown, with Text - How do I unselect the text?

查看:201
本文介绍了ComboBox,DropDownStyle:DropDown,带文本 - 如何取消选择文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ComboBox,我想用它作为下拉列表。  但我也希望Text属性中有一些文本(类似于"从下拉列表项中选择")。  但我不希望文本被"选中"。因为突出显示
令人分心。  我已经尝试过我能想到的每一个技巧来摆脱选择/突出显示但没有任何效果。  


有可能吗?  


谢谢,鲍勃

解决方案

嗨鲍勃,


也许你可以尝试这个链接:  http://stackoverflow.com/questions/2290563/create-winforms-combobox-with-non-selectable-items


I have a ComboBox which I want to use as a dropdown list.  But I also want to have some text in the Text property (which says something like "Select from drop down list items").  But I do not want the text to be "selected" because the highlighting is distracting.  I've tried every trick I can think of to get rid of the selection/highlighting but nothing has worked.  

Is it possible?  

Thanks,  Bob

解决方案

Hi bob,

Maybe you can try this link: http://stackoverflow.com/questions/2290563/create-winforms-combobox-with-non-selectable-items


这篇关于ComboBox,DropDownStyle:DropDown,带文本 - 如何取消选择文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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