DevExpress vcl 动态调用皮肤


本文整理自网络,侵删。

 
dxSkinController可以在运行时动态调入皮肤,不用在设计期Use一大堆皮肤文件。

把要用的皮肤用Skin Editor编辑一个SkinRes后缀的文件,然后在程序中动态调入就可以了。


uses dxSkinsDefaultPainters;

procedure TForm1.FormCreate(Sender: TObject);
begin
cxComboBox1.Properties.Items.Clear;
dxSkinsUserSkinPopulateSkinNames(ExtractFilePath(ParamStr(0))+'\bsSkins.skinres',
cxComboBox1.Properties.Items);
cxComboBox1.ItemIndex:=0;
end;

procedure TForm1.cxComboBox1PropertiesChange(Sender: TObject);
begin
//这个地方必须是UserSkin,不然不会起作用
dxSkinController1.SkinName:='UserSkin';
dxSkinsUserSkinLoadFromFile(ExtractFilePath(ParamStr(0))+'\bsSkins.skinres',cxComboBox1.EditText);
end;

procedure TForm1.dxSkinController1SkinForm(Sender: TObject;
AForm: TCustomForm; var ASkinName: String; var UseSkin: Boolean);
begin
UseSkin:=false;
end;

https://blog.csdn.net/QQ56430204/article/details/54647452

相关阅读 >>

Delphi 双击tmemo选择光标所在行

ring3下清零结束进程的Delphi版本

wmi远程访问问题解决方法

Delphi 使用泛型的 tarray 从动态数组中查找指定元素

Delphi根据输入日期按年月周日输出日期段

Delphi unigui hyperserver

Delphi fdconnection查看所有表包含用户表和系统表

Delphi application.processmessages的作用

Delphi unigui从数据表里下载流文件

Delphi idhttp上传图给asp完美解决

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...