Using a styled TListView to handle a long list of data

The TListBox control is very flexible. You can customize every aspect of each item in the list. However, it is not suitable if you want to handle a long list of data, because flexibility comes at the cost of the system being slow when data rows grow. Embarcadero specifies that you should use TListView to display a collection of items in a list that is optimized for LiveBindings and for fast and smooth scrolling.

Getting ready

In this recipe, we'll use the Do not block the main thread! recipe as a base to customize a listview using custom styles. In that recipe, we get a list of weather forecasts from a REST web service and then fill the listview with that data using a standard style. In this ...

Get Delphi Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.