How can I have an item like this inside of a Listbox?
Should I even be using a ListBox?
I'm开发者_如何学C talking about the Style control, and the Width control. How can I accomplish having these custom items?
Thank you!
Sure, use the ListBox.DrawMode property. Implement the DrawItem event to draw anything you like, it doesn't have to be just text. The Pen.DashStyle is interesting here.
I think you're trying to do custom drawing in a listbox. In which case the following SO question/ top-rated answer should help:
C# Can I display images in a list box?
精彩评论