就是滚动条的问题,你要先取得当前item所在的Position
procedure TForm1.ListView1MouseDown(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
var
p:tpoint;
tmpw,i:integer;
edtitem:TListItem;
begin
with TListView(sender)do
begin
edtitem:=GetItemAt(x,y);
if edtitem<>nil then
begin
p:=edtitem.Position;
tmpw:=p.X;
for i:=0 to Columns.Count-1do
begin
if (x>tmpw) and (x<(tmpw+Column.Width)) then
begin
showmessage(edtitem.SubItems[i-1]);
break;
end else
inc(tmpw,Column.Width);
end;
end;
end;
end;