如题

解决方案 »

  1.   

    补充一下,就是listview 在vsReport 时
      

  2.   

    Shell Control Pack VCL v1.6
    就有这个控件
    Web:
      http://plasmatech.com
      

  3.   

    至少有两个笨方法:
    1,改变标题内容
        在标题中加'▼'或'▲'
    2:改变Columns[i]的ImageIndex,事先指定SmallImages =ImageList,把前头图标放于ImageList1。
      

  4.   

    Copy From Delphi Help:
    /////////////////////////////////////////////////////////////////
    This example shows how to use the OnColumnClick and OnCompare events of a list view to let users sort the columns in a report-style list view by clicking on the column headers. This requires a global variable to keep track of the column that was clicked:var ColumnToSort: Integer;The OnColumnClick event handler sets the global variable to indicate the column to sort and calls AlphaSort:procedure TForm1.ListView1ColumnClick(Sender: TObject; Column: TListColumn);begin
      ColumnToSort := Column.Index;
      (Sender as TCustomListView).AlphaSort;
    end;
    The OnCompare event handler causes the list view to sort on the selected column:procedure TForm1.ListView1Compare(Sender: TObject; Item1, Item2: TListItem; Data: Integer; 
    var Compare: Integer);
    var
      ix: Integer;
    begin
      if ColumnToSort = 0 then
        Compare := CompareText(Item1.Caption,Item2.Caption)
      else begin
       ix := ColumnToSort - 1;
       Compare := CompareText(Item1.SubItems[ix],Item2.SubItems[ix]);
      end;end;Note: This OnCompare event handler uses the global CompareText function. An application may want to use AnsiCompareText, CompareStr, or AnsiCompareStr instead, depending on whether the comparison should be case-sensitive and whether the locale should be considered.大家找不到答案,应该看看帮助先!!!
      

  5.   

    我试着使用TCanvas在ListView上直接画图,画不上。ListView是Windows的内部控件,Delphi不过加了一个包装而已。OwnerDraw只是客户化显示条目,我试了,不能处理标题行。可能Windows没有提供客户化显示标题行的办法。如果想深入研究,只有去读Windows有关ListView的资料,有许多Message可以控制ListView,不知有没有客户化显示标题行的Message.