How to change FMX ListBoxGroupHeader text at run-time


Using FMX, XE8.

I’m trying to work out how to change the Text of a TListBoxGroupHeader at run time.

I have a TListBox where I’ve added (at design time) a TListBoxGroupHeader as first item.

There are a number of extra items in the list box (with controls on each item – I want these added at design time).

At run time I want to change the text of the ListBoxGroupHeader – I can’t work out how to do 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 the text.

Or rather, the Text data is changed, but does not change the Group Header in the listbox. That is, if I drop a label on the form and do:
then lbl1 displays ‘new text’.

Is this a bug or am I missing something?



Comments are closed.