uniGUI之换肤(17)

 在MainModule里  Design 模式

1]RecallLastTheme 设为True

2]Theme选一个皮肤

总共有

classic
gray
crisp
neptune
triton
triton.modified
aria
graphite

8个默认皮肤

uses uniStrUtils,

procedure TMainForm.UniFormCreate(Sender: TObject);
var
  S : TUniStringArray;//uniStrUtils
  I : Integer;
begin
  S := UniServerModule.ThemeManager.AllThemes;

  ThemeComboBox.Items.Clear;
  for I := Low(S) to High(S) do
    ThemeComboBox.Items.Add(S[I]);
ThemeComboBox.Text := UniMainModule.Theme;
ThemeComboBox.Style:= csDropDownList;  //uses Vcl.StdCtrls
end;
procedure TMainForm.ThemeComboBoxChange(Sender: TObject);
begin
    UniMainModule.Theme := ThemeComboBox.Text;
end;

猜你喜欢

转载自www.cnblogs.com/tulater/p/12274196.html