By: Yaroslav Brovin
Abstract: Small article about how globally to replace or add standard platform styles in FireMonkey 2.0 without use additional date of modules and TStyleBoo
This is a repost of a blog post. If you have comments, please comment on the original blog post at http://blogs.embarcadero.com/yaroslavbrovin/2012/10/29/fmx-20-global-change-default-platform-style-without-using-tstylebook/
Small article about how globally to replace or add standard platform styles in FireMonkey 2.0 without use additional date of modules and TStyleBook.
I think many faced some questions:
The task often meets and has the simple decision. But to tell about it follows, as I didn’t find the sounded decisions. A situation I correct
Firemonkey already has some platform’s styles resources. It consists:
To the bold are specified the name of an appropriate resource of style. To replace platform style, it is enough to include in the project the file of style with one of the specified names of resources (win7style, win8style, lionstyle, lion2xstyle)
Now we will try in practice.
1. Open fire monkey project. I used demo project ControlsDemo from XE3 samples
2. Go to "Project -> Resources and Images…"
3. Append our style for Windows 7 (for example Dark.style)
4. Build and run project.
If you want to replace styles for all platforms, respectively it is necessary for you to add in the project resources of files of styles for all registered platforms (win7style,win8style, lionstyle, lion2xstyle)
For example, when adding in the resource project for MacOS without Retina support.
Application becomes such:
Download Delphi 10 now!
Webinars on demand!
More social media choices:
Delphi on Google+
@RADTools on Twitter
Server Response from: ETNASC02