![]() ![]() ![]() ![]() class procedure SetStyle(const Name: string) overload Use this version when you want set a registered style using his name The SetStyle function has 3 overloaded versions To set in Runtime an already loaded (registered) style you must use the SetStyle(or TrySetStyle) procedure. TStyleManager.LoadFromResource(HInstance, StyleResource) //beware in this line you are only loading and registering a VCL Style and not setting as the current style. Procedure RegisterStyleFromResource(const StyleResource: string) TStyleManager.LoadFromFile(StyleFileName) //beware in this line you are only loading and registering a VCL Style and not setting as the current style.Īnd to load an style from a resource use the LoadFromResourceor TryLoadFromResource If TStyleManager.IsValidStyle(StyleFileName) then Procedure RegisterStyleFromDisk(const StyleFileName: string) To load (register) a VCL Style from a File you must use the LoadFromFile function of the TStyleManager class. In order to work with the VCL Styles you must use the TStyleManager class located in the Themes unit and include the Vcl.Styles unit to enable the VCL styles support. when you select a style, this is stored in the exe as a resource of the type VCLSTYLE with a 80 kb size approx by style. You can add a VCL Style to your application directly from the Delphi IDE menu entry Project-> Options -> Application -> Appearance Selecting the styles which you want to include in your Application and choosing a default style to apply. besides as how you can easily create a new style. So in this post I will show you the basics about how load in runtime an embedded style or read the style file directly from the disk. The new version of Rad Studio include a very nice feature called VCL Styles, this functionality allows you to apply a skin (theme) to any VCL Form application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |