• dxSkinController1 皮肤使用


    unit Unit1;
    
    interface
    
    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
      cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
      dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
      dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
      dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
      dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
      dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
      dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
      dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
      dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
      dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
      dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
      dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
      dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, cxStyles,
      dxSkinscxPCPainter, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit,
      cxNavigator, cxGridCustomTableView, cxGridTableView, cxGridCustomView,
      cxClasses, cxGridLevel, cxGrid, Vcl.Menus, cxContainer, cxTextEdit, cxButtons,
      Vcl.StdCtrls, dxSkinsForm, cxMaskEdit, cxDropDownEdit;
    
    type
      TForm1 = class(TForm)
        cxGrid1Level1: TcxGridLevel;
        cxGrid1: TcxGrid;
        view: TcxGridTableView;
        viewColumn1: TcxGridColumn;
        viewColumn2: TcxGridColumn;
        viewColumn3: TcxGridColumn;
        viewColumn4: TcxGridColumn;
        cxStyleRepository1: TcxStyleRepository;
        cxStyle1: TcxStyle;
        dxSkinController1: TdxSkinController;
        lst1: TListBox;
        cxComboBox1: TcxComboBox;
        procedure btn1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure cxComboBox1PropertiesChange(Sender: TObject);
        procedure lst1DblClick(Sender: TObject);
        procedure lst1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    {$R *.dfm}
    
    
    procedure TForm1.btn1Click(Sender: TObject);
    var
      i:Integer;
    begin
    
    end;
    
    procedure TForm1.cxComboBox1PropertiesChange(Sender: TObject);
    begin
      // 这个地方必须是UserSkin,不然不会起作用
      dxSkinController1.SkinName := 'UserSkin';
      dxSkinsUserSkinLoadFromFile('f:AllSkins.skinres', cxComboBox1.EditText);
    end;
    
    procedure TForm1.lst1Click(Sender: TObject);
    begin
      // 这个地方必须是UserSkin,不然不会起作用
      dxSkinController1.SkinName := 'UserSkin';
      dxSkinsUserSkinLoadFromFile('f:AllSkins.skinres', lst1.Items[lst1.ItemIndex]);
    end;
    
    procedure TForm1.lst1DblClick(Sender: TObject);
    begin
      // 这个地方必须是UserSkin,不然不会起作用
     // dxSkinController1.SkinName := 'UserSkin';
     // dxSkinsUserSkinLoadFromFile('f:AllSkins.skinres', lst1.Items[lst1.ItemIndex]);
    end;
    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    //设置其SkinName属性为UserSkin,NativeStyle=False,UseSkins=True;
       cxComboBox1.Properties.Items.Clear;
      dxSkinsUserSkinPopulateSkinNames('f:AllSkins.skinres',cxComboBox1.Properties.Items);
      cxComboBox1.ItemIndex := 0;
    
      dxSkinsUserSkinPopulateSkinNames('f:AllSkins.skinres',lst1.Items);
      lst1.ItemIndex:= 0;
    
    //  dxSkinController1.SkinName:= 'UseSkin';
      dxSkinController1.UseSkins:= True;
       dxSkinController1.NativeStyle:= False;
    
    end;
    
    
    
    end.
    书搞进脑袋 创新 创造; 积极
  • 相关阅读:
    Dapper ORM 用法—Net下无敌的ORM(转)
    微軟将从 .NET 4 以后的版本弃用 System.Data.OracleClient 以及Oracle 的各种连接方法
    最火的.NET开源项目
    sql日期格式化
    项目失败总结
    C#,往线程里传参数的方法总结
    线程的几种用法
    小程序api-01-abcdefg
    cnpm
    关于mpvue和wafer2-client-sdk的 微信登录失败,请检查网络状态
  • 原文地址:https://www.cnblogs.com/tobetterlife/p/12171166.html
Copyright © 2020-2023  润新知