FMX.Controls.TStyleCollectionItem.LoadFromFile
Delphi
procedure LoadFromFile(const FileName: string);
C++
void __fastcall LoadFromFile(const System::UnicodeString FileName);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Controls.pas FMX.Controls.hpp |
FMX.Controls | TStyleCollectionItem |
Description
Method to load a style to an Item of the collection, from a file.
Select the full path to the file or the file name when located in the project folder.
FireMonkey styles are delivered in the RAD Studio product installation, at the following paths:
- C:\Program Files (x86)\Embarcadero\Studio\\Redist\styles\Fmx
- C:\Users\Public\Documents\Embarcadero\Studio\\Styles
Apply the style to the form using the StyleBook property of the form, for example:
procedure TForm1.FormCreate(Sender: TObject);
begin
StyleBook1.Styles.Items[1].LoadFromFile('Air.Style');
StyleBook1.Styles.Items[2].LoadFromFile('Amakrits.Style');
Form1.StyleBook := StyleBook1;
end;