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

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXUtilityWindows

Edit And Store Custom Styles Within A TFrame 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 XE5 XE6 Firemonkey Custom Style Frames | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSA developer over on the Embarcadero forum has a tip about using a TFrame object to hold your custom styles in Delphi XE5 & XE6 Firemonkey. The basic idea is that you load up your custom styles into your TFrame and then you create your frame before any of the forms are created in the project file. By doing this you register those custom files with Delphi and that allows you to use them by name just like any other style from a StyleBook. I don’t quite understand the part about creating a custom style but Marco Cantu has a blog post for XE4 where he covers a custom style editor utility and some code to load styles with TStyleManager. There is also the MonkeyStyler utility for creating and editing your own styles. The key part to the forum post is where it explains how to reference the style names from the controls that you want to style. Here is an excerpt from the post:
you can apply the styles you created in the frame by referencing their stylenames to the styledcontrols in other forms. In design time, make sure you just keep the style frame open, so that style could take effect in design time. Not opening the style frame in design time doesn't affect the effect in runtime though.
Head over and read the full forum post about creating custom styles using a TFrame.

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

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

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

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

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

4 Comments

Leave a Reply