简体   繁体   中英

How to hide list of combobox whose DropDownStyle is set to simple?

I need to have drop down style of ComboBox set to simple because I have to hide the arrow that shows when style is set to ComboBox or DropDownList, this ComboBox will be disabled. I need to bind some items to this ComboBox via binding source, but the value is selected based on some properties calculated on a press of some button, that is why I need it disabled and without the arrow.

With this, because item is automatically selected, I need to hide the list that shows below. Is it possible to hide the list and how?

Try this technique..

Drag a LABEL control and change the back color as same as the color of the form and make the TEXT of LABEL into "" and the size of label must equal to the size of list of Dropdown box.

Then you can hide and show the LABEL ..

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM