tItem;
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;
procedure TForm1.ListView1DblClick(Sender: TObject);
var
Item: TListItem;
begin
Item := ListView1.GetItemAt(mouseX, mouseY);
if (Item <> nil) then
begin
beep();
//在这可写些响应双击图标代码。
end;
end;
procedure TForm1.ListView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
mouseX := X;
mouseY := Y;
end;
end.