How it works...

The TStyleManager class has all the methods we need to do the following:

  • Inspect the loaded styles with TStyleManager.StyleNames
  • Apply an already loaded style to the running application using the following code:
TStyleManager.SetStyle('StyleName') 
  • Check whether a file has a valid style using the following code:
TStyleManager.IsValidStyle('StylePathFileName') 
  • Load a style file from disk using the following code:
TStyleManager.LoadFromFile('StylePathFileName') 

After loading new styles from disk, the new styles are completely identical to the styles linked in the executable during the compile and link phases and can be used in the same way.