开发者

How can I have an item like this inside of a Listbox?

开发者 https://www.devze.com 2023-02-04 11:32 出处:网络
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?

Should I even be using a ListBox?

How can I have an item like this inside of 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消