Reputation: 165
I have interesting issue. I recompiling FMX application from XE7 to XE10.1 I Have form with ListBox and I dynamicaly creating TListBoxItem in code.
var
Item: TListBoxItem;
begin
Item := TListBoxItem.Create(nil);
Item.Parent := ListBox1;
Item.StyleLookup := 'listboxitemnodetail';
Item.Height:=50;
Item.WordWrap:=true;
Item.Text := 'abc';
Item.ItemData.Bitmap.LoadFromFile('img.bmp')
end;
But Image in ListBox item not show. This issue is only on Delphi XE 10.1 Berlin. On Delphi XE7 it works fine.
If I generate ListBoxItem manualy in IDE code works fine
Where can be problem ?
Upvotes: 0
Views: 1360
Reputation: 165
Issue fixed !
In XE10 is necessary set StyleLookup after Bitmap Load !
Upvotes: 3