الثلاثاء، 24 ديسمبر 2013

Listbox character limit per line

I have a listbox in my windows form application that shows quite long texts. Since texts are so long, user have to use the horizontal slider for check the rest of text.

So, I want to limit listbox character per line. For every 50 char it should go to next row, so user won't have to use glider.

I can't put "new line" since text source is Sql Database.

My code is basically this:

listbox1.items.add(dbRead["LongText"]); // dbRead = SqlDataReader

So I have to edit listbox itself. I've checked it a bit, but didn't manage to find. I've also tried to find an event like when text is changed, for every 50 char listbox.items.add("") etc. I'm still alien to syntax.

Any suggestions ?


View the original article here

ليست هناك تعليقات:

إرسال تعليق