2006-09-04

Multi-line List Control

When displaying tabular data in an application, the standard windows list control in report mode (what you see in explorer when you switch to the "details" view) usually works well. One limitation which has irritated me off and on over the years is the inability of the standard list control to handle multi-line data. What I wanted was something which would word wrap, respect embedded line breaks, and use dynamic row heights. The idea is that you just set the column widths, put whatever text you want in the control and it "just works" and provides multi-line text in the cells.

I finally decided to give custom control creation a try and created a control to do this. It was a bit more of a headache than I originally anticipated, but its at least functional now, so I posted it as an article over on The Code Project site.

You can read the article, which includes source code with a demo project here.

A screenshot of the control in action is shown below.

1 Comments:

Blogger Niya said...

Thanks for sharing the links. Great post. Thanks for the hard work.

Regards,
clipping path

12:46 AM  

Post a Comment

<< Home