📄 cvreg.pas
字号:
{------------------------------------------------------------------------------}
{ }
{ TCursorView v1.02 }
{ by Kambiz R. Khojasteh }
{ }
{ kambiz@delphiarea.com }
{ http://www.delphiarea.com }
{ }
{------------------------------------------------------------------------------}
{$I DELPHIAREA.INC}
unit CVReg;
interface
uses
Windows, Classes,
{$IFDEF COMPILER6_UP} DesignIntf, DesignEditors {$ELSE} DsgnIntf {$ENDIF};
type
{ TWavePropertyEditor }
TCursorFilePropertyEditor = class(TStringProperty)
public
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
end;
procedure Register;
implementation
uses
CursorView, Dialogs, SysUtils;
{ TCursorFilePropertyEditor }
function TCursorFilePropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog, paMultiSelect];
end;
procedure TCursorFilePropertyEditor.Edit;
var
I: Integer;
begin
with TOpenDialog.Create(nil) do
try
Filter := 'Cursor files (*.cur;*.ani)|*.cur;*.ani|Any file (*.*)|*.*';
Options := Options + [ofPathMustExist, ofFileMustExist];
if Execute then
begin
for I := 0 to PropCount - 1 do
TCursorView(GetComponent(I)).FileName := FileName;
Modified;
end;
finally
Free;
end
end;
procedure Register;
begin
RegisterComponents('Delphi Area', [TCursorView]);
RegisterPropertyEditor(TypeInfo(TFileName), TCustomCursorView, 'FileName', TCursorFilePropertyEditor);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -