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


Create A Custom Styled Firemonkey Component With The Delphi IDE

Simple Custom Styled Component Delphi FiremonkeyAndrea Magni has a blog post up that explains a simple method for creating a custom styled control using the Delphi IDE. This lets you bypass the Style Designer. The sample control that he builds is called TGmailLabel because it has a similar look and feel to an element from Gmail. The interesting thing here is that he builds the control that he wants on a normal FMX form and then does ‘View as Text’ on the form to get to the form objects as text. He then copies the form objects as text and puts them straight into a style file. Apparently form objects as text and style files have very similar formats. It looks like the component names are stripped out, any positioning of the main object is removed, and a StyleName line is added to each object. Here is a sample of the style below:

The example source code comes with the free TGmailLabel control so you get a free Delphi Firemonkey component too. The resulting component is cross platform and works on IOS, Android, OSX, and Windows. The blog is in Italian and the link auto translates it for you via Google Translate.

Check out the full blog post on how to build your own custom styled component.

Here is a mirror of the example source if the original goes down: Delphi Firemonkey GmailLabel Component

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

Related posts

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

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS


Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux


Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

Sign up for our Newsletter and
stay informed

Leave a Reply