0
dxSkinController1將整個應用程序的表單更改爲選定的外觀。但是,我希望排除一些表單。我怎樣才能做到這一點 ?從dxSkinController1中排除表單
dxSkinController1將整個應用程序的表單更改爲選定的外觀。但是,我希望排除一些表單。我怎樣才能做到這一點 ?從dxSkinController1中排除表單
上找到的DevExpress網站:
https://www.devexpress.com/Support/Center/Question/Details/B136071
procedure SetControlSkinName(AControl: TWinControl; const ASkinName: string);
var
AIntf: IcxLookAndFeelContainer;
I: Integer;
begin
if Supports(AControl, IcxLookAndFeelContainer, AIntf) then
begin
AIntf.GetLookAndFeel.NativeStyle := False;
AIntf.GetLookAndFeel.SkinName := ASkinName;
end;
for I := 0 to AControl.ControlCount - 1 do
if AControl.Controls[I] is TWinControl then
SetControlSkinName(TWinControl(AControl.Controls[I]), ASkinName);
end;
procedure TForm1.dxSkinController1SkinForm(Sender: TObject; AForm: TCustomForm;
var ASkinName: string; var UseSkin: Boolean);
begin
if AForm = Form1 then
begin
ASkinName := 'Metropolis';
UseSkin := True;
SetControlSkinName(AForm, ASkinName);
end;
end;
這實際上應用了期望的皮膚所需的形式。要排除表單的其餘部分,只需將dxSkinController1的NativeStyle設置爲false即可。
我假設你的意思是'TdxSkinController'組件? –
是的,當然... – user763539