2

I need to create a ListView at runtime, where ItemAppearance is set as DynamicAppearance, and then populate the ListView with values.

I know how to work with such a ListView created at design-time, but I can't find any information on how to properly create it at runtime.

Can someone provide an example of how to create such a ListView and add ListView objects (TTextObjectAppearance) to it?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Mindaugas
  • 115
  • 2
  • 11
  • 1
    Doing so in code would involve some "jumping through hoops", which is what the property editors do in the IDE. At runtime, the listview code uses the "synthesized" collection persisted in the .fmx file to create the appearance objects. If you're really set on it, take a look at the code in Source\Property Editors\FMX.Editor.ListView.pas, particularly the TAppearanceObjectSynthProperty class, and the classes in Source\fmx\FMX.ListView.DynamicAppearance.pas. One could spend a few hours working it all out, when it'd probably be easier just to do it at design time instead. – Dave Nottage Dec 27 '18 at 21:14

0 Answers0