Hi, if you mean something like this
(my first try) I use this code
unit UnitProgess;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes,
System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.ListView.Types, FMX.ListView.Appearances, FMX.ListView.Adapters.Base,
Data.Bind.GenData, System.Rtti, System.Bindings.Outputs, FMX.Bind.Editors,
Data.Bind.EngExt, FMX.Bind.DBEngExt, Data.Bind.Components,
Data.Bind.ObjectScope, FMX.ListView, Fmx.Bind.GenData;
type
TForm18 = class(TForm)
ListView1: TListView;
PrototypeBindSource1: TPrototypeBindSource;
BindingsList1: TBindingsList;
LinkListControlToField1: TLinkListControlToField;
procedure ListView1UpdateObjects(const Sender: TObject;
const AItem: TListViewItem);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form18: TForm18;
implementation
{$R *.fmx}
procedure TForm18.ListView1UpdateObjects(const Sender: TObject;
const AItem: TListViewItem);
var
pBitMap: TBitmap; // for further purpose
pListItemImage : TListItemImage;
begin
if AItem.Purpose = TListItemPurpose.None then
begin
pListItemImage:=AItem.Objects.FindObjectT<TListItemImage>('ProgressBar');
if assigned(pListItemImage) then
begin
pListItemImage.Bitmap.Width:=400-(abs(PrototypeBindSource1.DataGenerator.FindField('intfield1').GetTValue.AsInteger)*10);
pListItemImage.Bitmap.Clear(Talphacolors.RED);
end;
end;
end.
Quick designed
But I shall investigate more because this "version" need a link to (bitmap1 -> Item.ProgressBar)
I was enabled to add a bitmap directly (PlistItemImage is unassigned if there is no link)