delphi - How to change FMX ListBoxGroupHeader text at run-time -


using fmx, xe8.

i'm trying work out how change text of tlistboxgroupheader @ run time.

i have tlistbox i've added (at design time) tlistboxgroupheader first item.

there number of items in list box (with controls on each item - want these added @ design time).

at run time want change text of listboxgroupheader - can't work out how this.

i've tried:

 listboxgroupheader1.text:='new text';      listbox1.listitems[0].text:='new text';      tlistboxgroupheader(listbox1.listitems[0]).text:='new text';      tlistboxgroupheader(listbox1.listitems[0]).itemdata.text:='new text'; 

nothing changes text.

or rather, text data changed, not change group header in listbox. is, if drop label on form , do: lbl1.text:=lst1.listitems[0].text; lbl1 displays 'new text'.

is bug or missing something?

tia.

edb

tested delphi xe8 update 1.

i have same issue you. did following workaround:

var   form1: tform1;   listboxgroupheader1: tlistboxgroupheader;  implementation  {$r *.fmx}  procedure tform1.button1click(sender: tobject); begin   listboxgroupheader1 := tlistboxgroupheader.create(listbox1);   listboxgroupheader1.visible := false;   listboxgroupheader1.parent := listbox1;   listboxgroupheader1.visible := true; end;  procedure tform1.button2click(sender: tobject); begin   listboxgroupheader1.text := datetimetostr(now); end; 

Comments