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

📄 aboutedt.pas

📁 Delphi 开发的的热键操作 很值得看的
💻 PAS
字号:
unit AboutEdt;

interface

uses
  WinTypes, WinProcs, Classes, Graphics, Forms, Controls,
  StdCtrls, ExtCtrls, Buttons, DsgnIntf, AboutPrp;

type
  TAboutPropertyEditor = class(TPropertyEditor)
  public
    procedure Edit; override;
    function GetAttributes: TPropertyAttributes; override;
    function GetValue: string; override;
  end;

  TAboutPropertyDlg = class(TForm)
    btnOk: TButton;
    pnlFrame: TPanel;
    lblCopyright: TLabel;
    btnPaletteBmp: TSpeedButton;
    lblDescription: TLabel;
    lblCompany: TLabel;
    bvlSeparatorLine: TBevel;
    pbxComponentName: TPaintBox;
    procedure pbxComponentNamePaint(Sender: TObject);
  private
    FAboutInfo : TAboutInfo;
    procedure SetAboutInfo(Value: TAboutInfo);
  public
    ComponentName : string;
    property AboutInfo : TAboutInfo read FAboutInfo write SetAboutInfo;
  end;


implementation

{$R *.DFM}

uses
  SysUtils;

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


function TAboutPropertyEditor.GetValue: string;
begin
  Result := 'Press ... to Display';
end;


procedure TAboutPropertyEditor.Edit;
var
  Dialog: TAboutPropertyDlg;
begin
  Dialog := TAboutPropertyDlg.Create(Application);
  try
    Dialog.ComponentName := GetComponent(0).ClassName;
    Dialog.AboutInfo := TAboutInfo(GetOrdValue);
    Dialog.ShowModal;
  finally
    Dialog.Free;
  end;
end;


procedure TAboutPropertyDlg.SetAboutInfo(Value: TAboutInfo);

begin
  lblCopyright.Caption := 'Copyright 

⌨️ 快捷键说明

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