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

📄 md4propedit.pas

📁 外国人写的各种类型的源代码,有兴趣的朋友看看吧!是学习的好东西哟
💻 PAS
字号:
unit Md4PropEdit;

interface

uses
  DsgnIntf;

type
  TMd4IntListProperty = class (TStringProperty)
  public
    function GetAttributes: TPropertyAttributes; override;
    procedure Edit; override;
  end;

procedure Register;

implementation

uses
  SysUtils, Md4IlpeForm, Md4TabList, Forms, Controls;

function TMd4IntListProperty.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog, paReadOnly];
end;

procedure TMd4IntListProperty.Edit;
var
  PEForm: TIntListPEForm;
  Tabs: TMd4TabbedList;
  I: Integer;
begin
  PEForm := TIntListPEForm.Create (Application);
  try
    Tabs := GetComponent (0) as TMd4TabbedList;
    for I := Low (TMd4TabsArray) to High (TMd4TabsArray) do
      PEForm.Memo1.Lines.Add (IntToStr (Tabs.TabStops [I]));
    if PEForm.ShowModal = mrOK then
    begin
      for I := Low (TMd4TabsArray) to High (TMd4TabsArray) do
        Tabs.TabStops [I] := StrToIntDef (PEForm.Memo1.Lines [I], 0);
      Designer.Modified;
    end;
  finally
    PEForm.Free;
  end;
end;

procedure Register;
begin
  RegisterPropertyEditor (TypeInfo (string),
    TMd4TabbedList, 'TabsString', TMd4IntListProperty);
end;

end.

⌨️ 快捷键说明

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