5

I saw a youtube video (can't remember which one) where the user changed an option in Delphi XE2 to change the default style for an entire FireMonkey application. After much hunting I can't find the option.

IDE Insight for 'style' shows me 'Default Style - Custom Styles (Forms)' under 'Project Options'. But unless I'm being particularly thick, there's no such option there.

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Mike Sutton
  • 4,191
  • 4
  • 29
  • 42
  • @KenWhite That is painfully inaccurate. This is precisely what **FMX.Types.TStyleBook** was made for. – arkon Oct 12 '12 at 17:21
  • @b1naryatr0phy: You **did** notice that the comment was made more than a year ago, very shortly after XE2 and FM were first released? – Ken White Oct 12 '12 at 18:04
  • @KenWhite Are you trying to imply that FMX.Types.TStyleBook didn't exist at that time? Because if so, you're wrong again. And in fact, it looks to me like a proper answer was provided the very next day. So I fail to say how the timing of your comment excuses its inaccuracy. – arkon Oct 12 '12 at 18:35
  • @b1naryatr0phy: First, my intent was to tell you I didn't know at the time the comment was made it was wrong. Second, if you had enough rep you'd see that I wrote a long answer that was *correct*, and then deleted it because Robert's turned out to be better. Third, what does it matter to you that I made what turned out to be an erroneous comment 13 months ago, unless you're just looking to make noise, and we don't do that here. But fine; if it matters that much to you that you'll lose sleep over it, I'll delete it. I'd suggest you spend your time trying to do more constructive things, though. – Ken White Oct 12 '12 at 19:16
  • @KenWhite Is this how you react to everyone that corrects you? If you know your comment was false, you should have corrected yourself or deleted it; as opposed to jumping down the throats of those who correct you. – arkon Oct 12 '12 at 19:40
  • @b1naryatr0phy: I would have, if I'd remembered making it. It has been **13 months**, you see, and I'd lost track of it among the thousands of answers and comments I've posted here in the meantime. Thank you for the education in how to use SO. – Ken White Oct 12 '12 at 20:11
  • Here's a blog post showing how to change the resource for the default style within the IDE: http://infotipc.blog.com/2012/06/12/firemonkey-como-alterar-o-estilo-de-maneira-unificada/ – Mike Sutton Sep 28 '12 at 14:53

1 Answers1

15

VCL Styles and Firemonkey Styles are fundamentally different.

Because of that I am not sure they should have used the same name.

VCL Styles

  • Edited through: Tools|Style Designer (External App)
  • Style Extension .VSF
  • Format is Binary
  • Can be set through: Project Options|Application| Appearance (Which just add TStyleManager.SetStyle('StyleName'); to your code
  • Runtime control of styles can occur through the TStyleManager class

Firemonkey Styles

  • Editor is Internal to the IDE

    • Accessed through TStyleBook Resource Property Editor
    • Can also be accessed by Right click on any visual control and selecting either

      • Edit Custom Style...
      • Edit Default Style...
        Note: These two menu choices are only available in desktop apps, not mobile apps.
    • Once in editor you can select the Load.. button to change the style for the selected TStylebook. If the entire application is using the same TStyleBook it will change the whole application.

  • Style Extension .style
  • Format is like a DFM
  • Runtime control of styles can occur on each control and through the TStyleBook

On windows 7 all of the styles both VCL and Firemonkey by default are placed in the C:\Users\Public\Documents\RAD Studio\9.0\Styles directory

One bullet point is a direct answer, but I felt like I had to give the long answer to help others.

gwardell
  • 90
  • 2
  • 11
Robert Love
  • 12,447
  • 2
  • 48
  • 80