标签:
procedure TForm1.cxComboBox1PropertiesChange(Sender: TObject); begin // 这个地方必须是UserSkin,不然不会起作用 dxSkinController1.SkinName := ‘UserSkin‘; dxSkinsUserSkinLoadFromFile(‘AllSkins.skinres‘, cxComboBox1.EditText); end; procedure TForm1.dxSkinController1SkinForm(Sender: TObject; AForm: TCustomForm; var ASkinName: string; var UseSkin: Boolean); begin // Simon自己认为这一句不应该要,要了窗口就不能跟着变, //而且dxSkinController要在所有cx控件添加前添加,否则控件皮肤不受拜你控制。 // UseSkin := false; end; procedure TForm1.FormCreate(Sender: TObject); begin cxComboBox1.Properties.Items.Clear; dxSkinsUserSkinPopulateSkinNames(‘AllSkins.skinres‘,cxComboBox1.Properties.Items); cxComboBox1.ItemIndex := 0; end;
AllSkins.skinres所有的皮肤集成包在DevExpress\ExpressSkins Library\Binary Skin Files目录下,需要时放到应用程序同目录下或加载时修改路径
标签:
原文地址:http://www.cnblogs.com/win32pro/p/5588571.html