DEV Community

maxny1
maxny1

Posted on

Answer: How to access an ItemAppearance from ListView in Delphi 10?

procedure TForm1.ListView1ItemClick(const Sender: TObject;
  const AItem: TListViewItem);
begin
  showmessage(AItem.Objects[1].Data.AsString);  // Value of field
  showmessage(AItem.Objects[1].Name);  // Name of field

// OR

  showmessage(AItem.Data['txtID'].AsString);  // Value of field
end;

Top comments (0)