TileList

Hello


How to put color background to the TileList trought a solid color or with a png or bitmap?

I don't want to use an style. is there posible?

Also is there possible to put a different background for each tile I defined?


Thanks

Hello


I found the next code in the doc

procedure TForm1.TMSFMXTileList1CustomizeTile(Sender: TObject;
ATile: TTMSFMXTile; ATileShape: TControl);
var
shp: TTMSFMXTileShape;
begin
shp := ATile.Shape;
if Assigned(shp) and Odd(ATile.Index) then
begin
shp.Fill.Color := claRed;
(shp.ShapeCaption as TText).Fill.Color := claWhite;
end

That's excellent, can I do the same for the entire "content" of the TileList, I mean the whole background?


Thanks

Hi, 


You can take the first child which is the background in the style hierarchy:

  (TMSFMXTileList1.Children[0] as TRectangle).Fill.Color := claRed;

Kind Regards, 
Pieter

Thanks Pieter that did the trick.


Hello Pieter


Concerning to the Footer or Header of the TileList component, is there a way to change the gray color of the navigation bar without styles? Same principle as you published here " (TMSFMXTileList1.Children[0] as TRectangle).Fill.Color := claRed;"?????

Regards

Hi, 


Yes you can retrieve the header / footer rectangle with GetHeader / GetFooter and changing it can be done in the OnApplyStyleLookup

procedure TForm1.TMSFMXTileList1ApplyStyleLookup(Sender: TObject);
begin
  (TMSFMXTileList1.GetHeader as TRectangle).Fill.Color := claRed;
end;

Kind Regards, 
Pieter