Customizing the TListView
As we have already said in the recipe, Using a styled TListView to handle long list of data, the TListView
is the best control for handling long lists of data. We already know how to change the default style using the UpdateObjects
event, however this approach lacks the Delphi RADness approach; no visual preview, no object inspector, no Visual LiveBindings, no live data. In this recipe we'll look at how to create a TListView
style which can be installed in the Delphi IDE and used at design time in the object inspector and in the Visual LiveBindings designer.
Getting ready
TListView
uses the Appearance Class to define how it looks at runtime. An Appearance Class is nothing more than a class derived from TAppearanceObjects
(or one of its inherited classes). You can create and install a new customized appearance class and use it in your design, by installing a new package. This package defines the classes that implement a custom appearance for listview items. You can...