delphibuttonfiremonkeyrounded-cornersdelphi-12-athens

How do I make the corners rounded on TRectangle in Delphi FireMonkey?


I'm making a game in Delphi with FireMonkey and I'm trying to make a button with rounded corners using a TRectangle. It is the play button in the photo below:

Game built using Delphi Programming IDE

Is this possible? How can it be done?

I'm looking for something like the border-radius in CSS, but doesn't seem like there is something like that in Delphi. Or am I wrong? This is what I'm referring to: https://www.w3schools.com/css/css3_borders.asp


Solution

  • Look at the XRadius and YRadius properties on the TRectangle component.

    It's at the bottom of the properties:

    Delphi TRectangle XRadius and YRadius properties