TdxSkinController使用 我想用Delphi XE中自带的皮肤控件TdxSkinController,但是属性栏中不知道用哪个属性加载皮肤,还有不知道怎么引用皮肤,请问有谁用过这个控件?请问怎么用?有例子也可以,谢谢了!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 首先更正一下 TdxSkinController 不是delphi xe自带的控件,它是DevExpress套件当中的皮肤组件。给你写一个例子!代码如下:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, cxLookAndFeels, dxSkinsForm, StdCtrls,dxSkinsCore,cxLookAndFeelPainters, //加入所支持的皮肤 dxSkinBlack,dxSkinBlue,dxSkinCaramel,dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinMcSkin,dxSkinLilian,dxSkinCoffee;type TForm1 = class(TForm) dxSkinController1: TdxSkinController; ListBox1: TListBox; Button1: TButton; procedure Button1Click(Sender: TObject); procedure ListBox1DblClick(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);var i:Integer;begin //列举当前程序所支持的皮肤 for i:=0 to GetExtendedStylePainters.Count -1 do ListBox1.Items.Add(GetExtendedStylePainters.Names[i]);end;procedure TForm1.ListBox1DblClick(Sender: TObject);begin //切换皮肤 if ListBox1.ItemIndex = -1 then Exit; dxSkinController1.UseSkins := False; dxSkinController1.SkinName := ListBox1.Items[ListBox1.ItemIndex]; dxSkinController1.UseSkins := True;end;end. http://download.csdn.net/detail/lsh341999/3042740看看这个吧,而且还是外部加载的 //加入所支持的皮肤 dxSkinBlack,dxSkinBlue,dxSkinCaramel,dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinMcSkin,dxSkinLilian,dxSkinCoffee;请问,这个怎么加的,不明白 晕不死的。我用d7仿造了上面的程序。结果没动静。编译时能通过。点button1也能列出皮肤名称。双击listbox1就没动静。这是什么问题? 查出来了。代码少了一局:procedure TForm1.ListBox1DblClick(Sender: TObject);begin //切换皮肤 if ListBox1.ItemIndex = -1 then Exit; dxSkinController1.UseSkins := False; dxSkinController1.SkinName := ListBox1.Items[ListBox1.ItemIndex];// Showmessage(ListBox1.Items[ListBox1.ItemIndex]);// dxSkinController1.SkinName := ListBox1.Items[].Strings; dxSkinController1.NativeStyle := false; dxSkinController1.UseSkins := True;end;需要dxSkinController1.NativeStyle := false;就可以了。 瑞星误删了Delphi的升级应用程序! 简单问题:是用soap技术做三层系统中,客户端调用应用层,任何string类型是参数都必须按base64编码吗 自制下拉组合框 数据库恢复时出现的问题 向国里有共同发展中国软件志愿的盟友求精典软件:coderush D6 为什么换了位置就报错,请各位帮忙看看。 请问:WIN98下DELPHI6.0可以装SQL SERVER2000吗? 急!!求一个录音软件 什么是PE文件? 两个关于Outlook Express的问题...(不容易哦!) 如何给分配的内存赋值? IdFtp 没有 RecvBufferSize 属性
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, cxLookAndFeels, dxSkinsForm,
StdCtrls,dxSkinsCore,cxLookAndFeelPainters, //加入所支持的皮肤
dxSkinBlack,dxSkinBlue,dxSkinCaramel,dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinMcSkin,dxSkinLilian,dxSkinCoffee;type
TForm1 = class(TForm)
dxSkinController1: TdxSkinController;
ListBox1: TListBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure ListBox1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
begin
//列举当前程序所支持的皮肤
for i:=0 to GetExtendedStylePainters.Count -1 do
ListBox1.Items.Add(GetExtendedStylePainters.Names[i]);
end;procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
//切换皮肤
if ListBox1.ItemIndex = -1 then Exit;
dxSkinController1.UseSkins := False;
dxSkinController1.SkinName := ListBox1.Items[ListBox1.ItemIndex];
dxSkinController1.UseSkins := True;
end;end.
看看这个吧,而且还是外部加载的
dxSkinBlack,dxSkinBlue,dxSkinCaramel,dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinMcSkin,dxSkinLilian,dxSkinCoffee;
请问,这个怎么加的,不明白
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
//切换皮肤
if ListBox1.ItemIndex = -1 then Exit;
dxSkinController1.UseSkins := False;
dxSkinController1.SkinName := ListBox1.Items[ListBox1.ItemIndex];
// Showmessage(ListBox1.Items[ListBox1.ItemIndex]);
// dxSkinController1.SkinName := ListBox1.Items[].Strings;
dxSkinController1.NativeStyle := false;
dxSkinController1.UseSkins := True;end;
需要dxSkinController1.NativeStyle := false;
就可以了。