Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Build A Custom Button Using TRectangle In Delphi XE6 Firemonkey On Android And IOS

Delphi XE6 Firemonkey Rectangle ButtonDeveloper Antonio Estevez has some sample source code for implementing a TRectangle component as a button in Delphi XE6 Firemonkey (and AppMethod). This technique should run cross platform on Windows, IOS, OSX, and Android. The code uses Mouse Enter, Mouse Leave, Mouse Down, and Mouse up events to change the color of the TRectangle and give it the look of being pressed. TRectangle is a really fast Firemonkey component and you can even apply a bitmap to it using it’s Fill.Bitmap property. Check out the code snippet below:

Head over and check out the full thread on the Embarcadero forum where the code snippet is posted.

close

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

DelphiIDEShowcaseWindows

Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed

Leave a Reply