views:

357

answers:

1

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 the 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

A: 

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.

Jacob Seleznev