How to get Header Text and Detail text from Firemonkey TListView by Header textGlyphButton on ItemClickEx Event?

  

On my TListView on FireMonkey having the Header appearence as “Custom”, I need to get the header´s item text and detail text, on the TListview.ItemExClick event, when user click on the Header´s TListItemTextButton.

I have something like this…

procedure TForm1.lv1ItemClickEx(const Sender: TObject; ItemIndex:
Integer;
const LocalClickPos: TPointF; const ItemObject: TListItemDrawable);
begin
if ItemObject is TListItemTextButton then
begin
if TListItemTextButton(ItemObject).Text = ‘-‘ then
begin
TListItemTextButton(ItemObject).Text := ‘+’;
//Do something with header´s text
end
else if TListItemTextButton(ItemObject).Text = ‘+’ then
begin
TListItemTextButton(ItemObject).Text := ‘-‘;
//Do something with header´s text
end;
end;
end;

Any clues?
Thanx in advance.

Comments are closed.