Hola.
Otra opción para capturar el texto del ítem ante el click del ratón:
Código Delphi
[-]
...
uses CommCtrl;
function GetListViewSubItem( LView: TListView ): string;
var
Item: TListItem;
Info: TLVHitTestInfo;
Inx: Integer;
begin
Info.pt := LView.ScreenToClient( Mouse.CursorPos );
Inx := ListView_SubItemHitTest( LView.Handle, @Info );
Result := '';
if Inx <> -1 then
begin
Item:= LView.Items[Inx];
if Info.iSubItem = 0 then
Result := Item.Caption
else
Result:= Item.SubItems[Info.iSubItem-1];
end;
end;
Ejemplo de uso:
Código Delphi
[-]
procedure TForm1.ListView1Click( Sender: TObject );
begin
Caption := GetListViewSubItem( ListView1 );
end;
Saludos