📄 spellersreg.pas
字号:
unit SpellersReg;
interface
uses
{$IFDEF VER130} { Borland Delphi 5.x }
DsgnIntf;
{$ELSE}
DesignIntf, DesignEditors;
{$ENDIF}
procedure Register;
implementation
uses
Dialogs, Windows, Forms, Classes, SysUtils, Spellers, Langs, LangsReg;
type
TDictFileProperty = class(TStringProperty)
public
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
end;
procedure TDictFileProperty.Edit;
var
FileOpen: TOpenDialog;
begin
FileOpen := TOpenDialog.Create(Application);
FileOpen.Filename := GetValue;
FileOpen.Filter := 'Dictionary files (*.dic)|*.dic|All files (*.*)|*.*';
FileOpen.Options := FileOpen.Options + [ofShowHelp, ofPathMustExist,
ofFileMustExist];
try
if FileOpen.Execute then SetValue(FileOpen.Filename);
finally
FileOpen.Free;
end;
end;
function TDictFileProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog, paRevertable];
end;
procedure Register;
begin
RegisterComponents('LS', [TSpellChecker]);
RegisterPropertyEditor(TypeInfo(TFileName), TSpellChecker, 'CustomDict', TDictFileProperty);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -