Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS FMX UI Pack
TTMSFMXTileList: How to change the default color of the badge

You can change the default color with the following code:

procedure TForm1.TMSFMXTileList1CustomizeTileBadge(Sender: TObject;
  ATile: TTMSFMXTile; ATileBadge: TControl);
var
  r: TControl;
begin
  (ATile.ShapeBadge as TTMSFMXBadge).NeedStyleLookup;
  (ATile.ShapeBadge as TTMSFMXBadge).ApplyStyleLookup;
  r := (ATile.ShapeBadge as TTMSFMXBadge).GetContent;

  if Assigned(r) then
  begin
    (r as TRoundRect).Fill.Color := claLimegreen;
    (r as TRoundRect).Fill.Kind := TBrushKind.Solid;
    (r as TRoundRect).Stroke.Color := claGreen;
  end;
end;