We have a great new FireMonkey demo for RAD Studio 10.1 Berlin that shows you how to populate TListView with images from a TImageList component. FireMonkey image lists are collections of multi-resolution bitmaps. Image lists are used to efficiently manage large collections of icons or bitmaps.
Our demo shows you how to use TListView together with TImageList. TListView items with images can use bitmaps directly, bitmaps referenced from elsewhere or bitmaps specified as indices in an ImageList. Depending on the kind of appearance used, there are different ways to select an ImageIndex.
During today's Delphi, C++Builder and RAD Studio 10 Seattle launch webinar, I got a question on how to add headers to TListView programmatically instead of using LiveBindings with a data source.
Here is a quick code snippet showing how to programmatically add TListView headers.
procedure TListViewHeaders.FormCreate(Sender: TObject);
var
Group, Item: Integer;
begin
for Group in [1..4] do
begin
with ListView1.Items.Add do
begin
Text := Format('Header %d', [Group]);
...
FireMonkey’s underlying visual control architecture has been significantly overhauled in XE8 to enable multiple presentation implementations per control called “ControlTypes” - in particular, native OS control presentations can be utilized. The new underlying architecture is MVC based and is backward compatible enabling developers to choose at design time between Styled and Platform control types on a per control* basis (*for controls that include both control types). This allows you to select w...
Working with Custom LiveBindings Expressions
Using LiveBindings, custom LiveBindings expressions and TListView, it it easy to add ListView headers to your FM mobile application that support alphabetical ordering and various other customizations. It will only take a couple of steps to enable it for data that is already alphabetically sorted, and an additional step for unsorted data.
Adding A-Z grouping to your ListView headers for alphabetically sorted data
The first example use...