convert vcl project to fmx Delphi 10.3

  

I try to use Listview in my fmx project , and grab text from it Like vcl , How can I using it in fmx project not in vcl ?

procedure TForm1.Button1Click(Sender: TObject);
var
item: TListItem;
begin
item := ListView1.Items.Add;
item.Caption := ‘Mohamed’;
item.SubItems.Add(‘Akram’);
item.SubItems.Add(‘055002011’);
item.ImageIndex := 0;
end;

procedure TForm1.CaptionclickClick(Sender: TObject);
begin
Memo1.Lines.Add(‘caption : ‘ + ListView1.Items[ListView1.Selected.
Index].Caption);
end;

procedure TForm1.FirstitemclickClick(Sender: TObject);
begin
Memo1.Lines.Add(‘First sub item : ‘ + ListView1.Items[ListView1.Selected.
Index].SubItems[0]);
end;

procedure TForm1.SeconditemclickClick(Sender: TObject);
begin
Memo1.Lines.Add(‘Second sub item : ‘ + ListView1.Items[ListView1.Selected.
Index].SubItems[1]);
end;

https://6.top4top.net/p_1260py56w1.jpg

Comments are closed.