var
hts : THitTests;
ht : THitTest;
sht : string;
ListViewCursosPos : TPoint;
selectedItem : TListItem;
begin
ListViewCursosPos := ListView1.ScreenToClient(Mouse.CursorPos) ;
hts := ListView1.GetHitTestInfoAt(ListViewCursosPos.X, ListViewCursosPos.Y) ;
Caption := '';
for ht in hts do
/ /aqui me da un error que dice For loop control variable must be simple local variable y ya no se que poner
begin
sht := GetEnumName(TypeInfo(THitTest), Integer(ht)) ;
Caption := Format('%s %s | ',[Caption, sht]) ;
end;
if hts <= [htOnIcon, htOnItem, htOnLabel, htOnStateIcon] then
begin
selectedItem := ListView1.Selected;
Caption := Format('DblClcked : %s',[selectedItem.Caption]) ;
end;
end;