Customizing the TListView
As already said in the Using a styled TListView to handle a long list of data recipe, 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 list view items. You can customize...