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

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Customize Button Colors In Delphi XE5 & XE6 Firemonkey On Android And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE6 Firemonkey Customize Color SpeedButton | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDelphi XE6 Firemonkey has some new tint properties for easily changing the color of a TSpeedButton, a TButton, and a TToolBar. Sarina DuPont from Embarcadero has a new blog post up where she explains how to use the new properties and what they actually effect. The properties are cross platform but behave a bit different depending on the OS that your app is running on. For example, in IOS7 the TintColor property changes the outline and mousedown looks of a button but on Android it changes the background color of the button. You can also customize the color of the icon on some button styles using the IconTintColor property. And lastly you can modify the font color depending on the button state like being focused or pressed. Something else to keep in mind is that you can also use a colored TRectangle as a button or as a background for other transparent controls (like a TLabel or a transparent TListBox) because with Firemonkey any control can be the parent of any other control. Which is to say every control in Firemonkey is a container for every other control like it was a VCL TPanel. A TRectangle has a Fill and a Stroke property which allows you to change the background color and the line color of the rectangle. You can also use this TRectangle trick with Delphi XE5 and AppMethod since they do not support the new TintColor property. Be sure to set HitTest to True if you use a TRectangle as a button.

Head over and check the full blog post about using the new TintColor properties with Delphi XE6 Firemonkey.

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

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


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

Sign up for our Newsletter and
stay informed

Leave a Reply