aboutedt.pas
来自「HOOK」· PAS 代码 · 共 73 行
PAS
73 行
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 + =
减小字号Ctrl + -
显示快捷键?