Reputation: 367
I need to access (ShowMessage) of the Text propertys of the FOOTER, HEADER, ITEMS in the FMX.ListView control.
The 1,2,3 are the Headers (ItemText).
How can I do a simple show message to show these values.
Upvotes: 3
Views: 4356
Reputation: 2977
You can do so by checking the Purpose property of each item in the list, for example :
procedure TForm1.Button1Click(Sender: TObject);
var I : Integer;
begin
for I := 0 to ListView1.ItemCount - 1
do begin
case ListView1.Items.Item[I].Purpose
of
TListItemPurpose.None: ShowMessage('Item: ' + ListView1.Items.Item[I].Text);
TListItemPurpose.Header: ShowMessage('Header: ' + ListView1.Items.Item[I].Text);
TListItemPurpose.Footer: ShowMessage('Footer: ' + ListView1.Items.Item[I].Text);
end;
end;
end;
Upvotes: 4