> Yip got that far, but how do I trigger it to
go off and do a sort again
> when I click on the header? That's where I am stuck now.
> when I click on the header? That's where I am stuck now.
procedure TListViewForm.FileViewColumnClick(Sender:
TObject; Column: TListColumn);
function CustomSortProc(Item1, Item2: TListItem; OptionalParam: integer): integer; stdcall;
begin
function CustomSortProc(Item1, Item2: TListItem; OptionalParam: integer): integer; stdcall;
begin
Result
:= StrToInt(Item1.SubItems[0]) >
StrToInt(Item2.SubItems[0])
if ReverseSort then Result :=
-Result;
end;
ListView.CustomSort(@CustomSortProc,
OptionalParam);
end;
end;
> do I have to repopulate the listview
No.
Regards,
Ross Levis.
