Formatting Text

The text displayed in column headers, items and sub-items can be formatted by two parameters:

Alignment is basically a placement of text relative to element margins. The text can be aligned to the left side, right side or centered.

Text trimming is an ehnancement for text formatting in Better ListView. When the text area is too small for displaying the text, it is trimmed. There are several triming options in Better ListView:

Text formatting can be set separately for every element in the Better ListView. Original ListView allows item and sub-item alignment only on per-column basis and the trimming cannot be controlled.

Every column header, item and sub-item can have its own font and color:

Formatting Text in Column Headers

There are three properties for setting text format in column headers:

The MaximumLines property defines what is the maximum allowed number of lines for the trimmed text. Look at the images on differently sized column header below (there is a maximum of four lines):

Formatting Text in Items

Besides from column headers, item and sub-item texts are restricted to be on one line (although can be broken in several lines - this happens in the LargeIcon view). So there are only two properties to setup text formatting:

Various text trimming methods are presented on the sentence starting with the words "An elephant went to the market" and a sample path:

Sample Application

The BetterListViewTextSample shows the various trimming methods. Note that text in the column headers is trimmed with EllipsisCharacter method. The frist two column, however, can show only single line of text, while the third column header can show up to four lines (because of different MaximumLines property setting):