⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spreg.pas

📁 一款支持Delphi和C++ Builder的VCL控件
💻 PAS
📖 第 1 页 / 共 3 页
字号:
end;

function TspSkinStatusBarEditor.GetVerbCount: Integer;
begin
  Result := 6;
end;

function TspSkinStatusBarEditor.GetVerb(Index: Integer): string;
begin
  case Index of
    0: Result := sNEW_STATUSPANEL;
    1: Result := sNEW_STATUSGAUGE;
    2: Result := sNEW_STATUSEDIT;
    3: Result := sNEW_STATUSBUTTONEDIT;
    4: Result := sNEW_STATUSSPINEDIT;
    5: Result := sNEW_STATUSCOMBOBOX;
  end;
end;

procedure TspSkinToolBarEditor.ExecuteVerb(Index: Integer);
var
  NewSpeedButton: TspSkinSpeedButton;
  NewMenuSpeedButton: TspSkinMenuSpeedButton;
  NewBevel: TspSkinBevel;
  NewEdit: TspSkinEdit;
  NewSpinEdit: TspSkinSpinEdit;
  NewComboBox: TspSkinComboBox;
  PControl : TspSkinToolBar;
  NewNumericEdit: TspSkinNumericEdit;
  NewFontComboBox: TspSkinFontComboBox;
  NewFontSizeComboBox: TspSkinFontSizeComboBox;
  NewColorButton: TspSkinColorButton;
begin
  if Component is TspSkinToolBar
  then
    PControl := TspSkinToolBar(Component)
  else
    Exit;
  case Index of
    0:  begin
          NewSpeedButton := TspSkinSpeedButton.Create(Designer.GetRoot);
          with NewSpeedButton do
          begin
            Flat := PControl.Flat;
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            if (PControl.SkinDataName = 'resizetoolpanel')
            then
              SkinDataName := 'resizetoolbutton'
            else
            if PControl.SkinDataName = 'panel'
            then
              SkinDataName := 'resizebutton'
            else
            if PControl.SkinDataName = 'bigtoolpanel'
            then
              SkinDataName := 'bigtoolbutton'
            else
              SkinDataName := 'toolbutton';
            Designer.SelectComponent(NewSpeedButton);
          end;
        end;
    1:  begin
          NewMenuSpeedButton := TspSkinMenuSpeedButton.Create(Designer.GetRoot);
          with NewMenuSpeedButton do
          begin
            Flat := PControl.Flat;
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            if (PControl.SkinDataName = 'resizetoolpanel')
            then
              SkinDataName := 'resizetoolbutton'
            else
            if PControl.SkinDataName = 'panel'
            then
              SkinDataName := 'resizebutton'
            else
            if PControl.SkinDataName = 'bigtoolpanel'
            then
              SkinDataName := 'bigtoolmenubutton'
            else
              SkinDataName := 'toolmenubutton';
            Designer.SelectComponent(NewMenuSpeedButton);
          end;
        end;
    2:  begin
          NewMenuSpeedButton := TspSkinMenuSpeedButton.Create(Designer.GetRoot);
          with NewMenuSpeedButton do
          begin
            Flat := PControl.Flat;
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            TrackButtonMode := True;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            if (PControl.SkinDataName = 'resizetoolpanel')
            then
              SkinDataName := 'resizetoolbutton'
            else
            if PControl.SkinDataName = 'panel'
            then
              SkinDataName := 'resizebutton'
            else
            if PControl.SkinDataName = 'bigtoolpanel'
            then
              SkinDataName := 'bigtoolmenutrackbutton'
            else
              SkinDataName := 'toolmenutrackbutton';
            Designer.SelectComponent(NewMenuSpeedButton);
          end;
        end;
    3: begin
          NewBevel := TspSkinBevel.Create(Designer.GetRoot);
          with NewBevel do
          begin
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            Width := 25;
            DividerMode := True;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            Designer.SelectComponent(NewBevel);
          end;
        end;
    4:
       begin
         NewEdit := TspSkinEdit.Create(Designer.GetRoot);
          with NewEdit do
          begin
            Left := PControl.Width;
            SkinDataName := 'edit';
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            SkinData := PControl.SkinData;
            Designer.SelectComponent(NewEdit);
          end;
       end;
    5:
       begin
         NewEdit := TspSkinEdit.Create(Designer.GetRoot);
         with NewEdit do
         begin
           ButtonMode := True;
           Left := PControl.Width;
           SkinDataName := 'buttonedit';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewEdit);
         end;
       end;
    6:
       begin
         NewSpinEdit := TspSkinSpinEdit.Create(Designer.GetRoot);
         with NewSpinEdit do
         begin
           Left := PControl.Width;
           SkinDataName := 'spinedit';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewSpinEdit);
         end;
       end;
    7:
       begin
         NewComboBox := TspSkinComboBox.Create(Designer.GetRoot);
         with NewComboBox do
         begin
           Left := PControl.Width;
           SkinDataName := 'combobox';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewComboBox);
         end;
       end;
    8: begin
         NewNumericEdit := TspSkinNumericEdit.Create(Designer.GetRoot);
         with NewNumericEdit do
         begin
           Left := PControl.Width;
           SkinDataName := 'buttonedit';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewNumericEdit);
         end;
       end;
    9:
       begin
         NewFontComboBox := TspSkinFontComboBox.Create(Designer.GetRoot);
         with NewFontComboBox do
         begin
           Left := PControl.Width;
           SkinDataName := 'combobox';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewFontComboBox);
         end;
       end;
    10:
       begin
         NewFontSizeComboBox := TspSkinFontSizeComboBox.Create(Designer.GetRoot);
         with NewFontSizeComboBox do
         begin
           Left := PControl.Width;
           SkinDataName := 'combobox';
           Parent := PControl;
           Align := alLeft;
           Name := Designer.UniqueName(ClassName);
           SkinData := PControl.SkinData;
           Designer.SelectComponent(NewFontSizeComboBox);
         end;
       end;
      11:  begin
          NewColorButton := TspSkinColorButton.Create(Designer.GetRoot);
          with NewColorButton do
          begin
            Flat := PControl.Flat;
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            if (PControl.SkinDataName = 'resizetoolpanel')
            then
              SkinDataName := 'resizetoolbutton'
            else
            if PControl.SkinDataName = 'panel'
            then
              SkinDataName := 'resizebutton'
            else
            if PControl.SkinDataName = 'bigtoolpanel'
            then
              SkinDataName := 'bigtoolmenubutton'
            else
              SkinDataName := 'toolmenubutton';
            Designer.SelectComponent(NewMenuSpeedButton);
          end;
        end;
    12: begin
          NewColorButton := TspSkinColorButton.Create(Designer.GetRoot);
          with NewColorButton do
          begin
            Flat := PControl.Flat;
            SkinData := PControl.SkinData;
            Left := PControl.Width;
            TrackButtonMode := True;
            Parent := PControl;
            Align := alLeft;
            Name := Designer.UniqueName(ClassName);
            if (PControl.SkinDataName = 'resizetoolpanel')
            then
              SkinDataName := 'resizetoolbutton'
            else
            if PControl.SkinDataName = 'panel'
            then
              SkinDataName := 'resizebutton'
            else
            if PControl.SkinDataName = 'bigtoolpanel'
            then
              SkinDataName := 'bigtoolmenutrackbutton'
            else
              SkinDataName := 'toolmenutrackbutton';
            Designer.SelectComponent(NewMenuSpeedButton);
          end;
        end;
  end;
  if Designer <> nil then Designer.Modified;
end;

function TspSkinToolBarEditor.GetVerbCount: Integer;
begin
  Result := 13;
end;

function TspSkinToolBarEditor.GetVerb(Index: Integer): string;
begin
  case Index of
    0: Result := sNEW_TOOLBUTTON;
    1: Result := sNEW_TOOLMENUBUTTON;
    2: Result := sNEW_TOOLMENUTRACKBUTTON;
    3: Result := sNEW_TOOLSEPARATOR;
    4: Result := sNEW_TOOLEDIT;
    5: Result := sNEW_TOOLBUTTONEDIT;
    6: Result := sNEW_TOOLSPINEDIT;
    7: Result := sNEW_TOOLCOMBOBOX;
    8: Result := sNEW_TOOLNUMERICEDIT;
    9: Result := sNEW_TOOLFONTCOMBOBOX;
    10: Result := sNew_TOOLFONTSIZECOMBOBOX;
    11: Result := sNEW_TOOLMENUCOLORBUTTON;
    12: Result := sNEW_TOOLMENUCOLORTRACKBUTTON;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -