end else begin if m_bSort then begin Result := CompareText(Item1.Caption,Item2.Caption); end else begin Result := -CompareText(Item1.Caption,Item2.Caption); end; end; end; procedure TForm1.ListView1ColumnClick(Sender: TObject; Column: TListColumn); begin ListView1.CustomSort(@CustomSortProc, Column.Index); m_bSort := not m_bSort; end;
listview,Delphi ListView排序
end else begin if m_bSort then begin Result := CompareText(Item1.Caption,Item2.Caption); end else begin Result := -CompareText(Item1.Caption,Item2.Caption); end; end; end; procedure TForm1.ListView1ColumnClick(Sender: TObject; Column: TListColumn); begin ListView1.CustomSort(@CustomSortProc, Column.Index); m_bSort := not m_bSort; end;
最新评论