Can I put a horizontal line in a combo box or list control?

Go To


I'm building a Windows Form that includes a combo box control, and I wanted to put a horizontal line between certain items. I've seen this done in other contexts using a hyphen in an item list, but a hyphen doesn't do this in this case. I don't know if a horizontal line is even possible with this control. What I am trying to accomplish is something like:

Item 1
Item 2
Item 3
Item A

I suppose I could simply put a line of hyphens in there, but a nice clean line would be better if it could be done.

2012-04-04 18:58
by Cyberherbalist
I hope this help, it sill needs improvement though. ( - Ace Caserya 2013-08-07 00:21


Unfortunately, I have not been able to find anything that comes standard in the control with "clean" solutions yet.

I found something where you can draw the line between every item at this link. With some fancy work you may be able to find a way of making it draw the line only when you want to.

Alternatively, there is a CodeProject combobox that includes line separators.

2012-04-04 19:11
by ImGreg