Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Adding multiline text in the listview header
The TAdvListView component supports HTML formatted text, combination of images and text as well as multiline text in the header. .The key property to enable this capability is AdvListView.HeaderOwnerDraw. When this property is set to true, this becomes possible. Following code snippet shows how to initialize the listview with multiline text:
begin advlistview1.ViewStyle := vsReport; AdvListView1.Columns.Add.Caption := 'Column 1'#13#10'Extra info'; AdvListView1.HeaderHeight := 30; AdvListView1.Columns.Add.Caption := 'Line1'#13#10'Line2'; AdvListView1.Columns.Add.Caption := 'Column 3'; advlistview1.OwnerDraw := true; advlistview1.HeaderOwnerDraw:= true; end;