开发者

Custom ListView binding it to a object list [winforms]

EDIT: Question Reworded

I have a listbox that should display data that contains 2 fields: time and a message. Instead of displaying 1 line of text, I want each item to be displayed as 2 lines - 1st line is the time and the 2nd line is the message, where each line has a different style.

How can I do this? I can bind t开发者_开发问答he object array to the listbox, but how do I style it? Thanks for your answers.

P.S. I looked at WPF, I think to learn it might take a few days; also, the rest of the code is winforms


I would transform your data source into collection of strings: time1, message1, time2, message2 ... and the rest is simple - just bind new data source to the list box.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜