Edit And Store Custom Styles Within A TFrame In Delphi XE5 & XE6 Firemonkey On Android And IOS

  

A 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.

Comments are closed.