LF – Owl's Blog on .NET development http://www.componentowl.com/blog Component Owl codes Better ListView control all night so you don't have to. Tue, 04 Sep 2018 13:10:05 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 Displaying Multi-Line Text In ListView http://www.componentowl.com/blog/displayingmultiline-items-in-listview/ http://www.componentowl.com/blog/displayingmultiline-items-in-listview/#respond Thu, 24 Nov 2011 16:42:44 +0000 http://www.componentowl.com/blog/?p=450 Multi-Line text has been supported since Better ListView 2.0 (as automatic text-wrapping with configurable number of Maximum Text Lines), but we enhanced this feature inversion 2.3.2 by adding support for “hardcoded” newline characters (LF) in item text:

Items with multi-line text

Items with multi-line text

Column headers and even groups can contain multi-line text:

Multi-line text in groups

Multi-line text in groups

So the text can be split on multiple lines not only by wrapping the text, but also by user defined newline characters.

This feature comes out of the box.

The only setting associated with multi-line items is the MaximumTextLines property of the corresponding layout (e.g. BetterListView.LayoutItemsLargeIcon). This property specifies how many lines the text can have and this applies to both wrapped text and text with newline characters. So if you expect you text to have 5 to 20 lines, set the MaximumTextLines property to 20 and you know the items will not get too high while still displaying all the lines.

Multi-line text is supported on column headers, items, sub-items and groups.

Download the latest Better ListView

]]>
http://www.componentowl.com/blog/displayingmultiline-items-in-listview/feed/ 0