Search code examples
firemonkeyc++builder-10.2-tokyo

Clear a FireMonkey TListView


Is there a preferred way to clear a TListView control or do we just cycle through all items deleting them?

Below is code to clear a TListBox. Is there something similar for TListView that I'm just missing in my searching?

Form1->ListBox2->Clear();

thanks, russ


Solution

  • Use the Items->Clear() method:

    ListView1->Items->Clear();