Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Easy way to apply a style to a firemonkey app


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 19, 2016 1:24 AM Last Post By: Tom Roberts
Tom Roberts

Posts: 102
Registered: 6/21/05
Easy way to apply a style to a firemonkey app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2016 12:19 AM
In my VCL app main form constructor the following code allows me to set an overall style for the app

TStyleManager::LoadFromFile("C:/Users/Public/Documents/Embarcadero/Studio/18.0/Styles/CyanDusk.vsf");
TStyleManager::TrySetStyle("Cyan Dusk");

Could someone kindly show me how to do the same thing in a Berlin 10.1 firemonkey app? I just want to be able to apply one of the styles from the "C:\Program Files (x86)\Embarcadero\Studio\18.0\Redist\styles" in the same way as above. I've looked at the documentation and everything I come across seems to cover just Delphi and refers to ide buttons from an older version of rad studio that I can't find in Berlin.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Easy way to apply a style to a firemonkey app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2016 1:07 PM   in response to: Tom Roberts in response to: Tom Roberts
Tom wrote:

In my VCL app main form constructor the following code allows me
to set an overall style for the app

TStyleManager::LoadFromFile("C:/Users/Public/Documents/Embarcadero/Stu
dio/18.0/Styles/CyanDusk.vsf");

TStyleManager::TrySetStyle("Cyan Dusk");

Could someone kindly show me how to do the same thing in a Berlin
10.1 firemonkey app?

TStyleManager exists in FireMonkey as well. It does not have a LoadFromFile()
method, but it does have a SetStyleFromFile() method instead:



I've looked at the documentation and everything I come across seems
to cover just Delphi

Just about everything you do in Delphi can be done in C++Builder as well,
since they share the same RTL/VCL/FMX libraries.

and refers to ide buttons from an older version of rad studio
that I can't find in Berlin.

Such as?

--
Remy Lebeau (TeamB)
Tom Roberts

Posts: 102
Registered: 6/21/05
Re: Easy way to apply a style to a firemonkey app  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2016 1:24 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks Remy. A pretty ugly choice in that Styles directory.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02