Search code examples
firemonkeydelphi-2010delphi-10.1-berlin

make a partial transparancy in a FMX.Objects.TRectangle


Does anyone know, how to make a partial transparancy in a FMX.Objects.TRectangle in a Firemonkey iOS / Android application? My goal is to show a message in a rectangle with a little grey transparancy as if the form is disabled


Solution

  • The TRectangle.Fill.Color allows you to set its transparency. If you edit it in the Delphi IDE, set it to black, then double-click it and set the "A" value to e.g. 128 (=50% transparency).