Delphi VCL styles tutorial - how to change the style at runtime

后端 未结 3 1796
悲哀的现实
悲哀的现实 2020-11-30 06:22

Is there a good VCL Styles tutorial where we see how to dynamically (in run time) load/change the style ?

This should work with Delphi XE2 and up, since XE2 is the

3条回答
  •  生来不讨喜
    2020-11-30 06:52

    A example (public procedure). Remember uses Vcl.Themes;

    procedure TData.AllowSKIN( bSKIN:boolean );
    var
        sSKIN:string;
    begin
        sSKIN := 'Aqua Light Slate';
        if not bSKIN then sSKIN := 'Windows';
        TStyleManager.TrySetStyle( sSKIN );
    end;
    

提交回复
热议问题