📄 petag.pas
字号:
unit PeTag;
interface
uses
SysUtils, WinTypes, WinProcs, Messages,
Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, DsgnIntf;
type
TTagMultiProperty = class (TIntegerProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
procedure Register;
implementation
uses
PefTag;
{property editor methods}
function TTagMultiProperty.GetAttributes:
TPropertyAttributes;
begin
Result := [paDialog, paMultiSelect];
end;
procedure TTagMultiProperty.Edit;
var
PeForm: TTagForm;
begin
PeForm := TTagForm.Create (Application);
PeForm.Pe := self;
try
// update the list
PeForm.UpdateList;
// select and show the first item
PeForm.ListBoxTags.ItemIndex := 0;
PeForm.ListBoxTagsClick (self);
// show the form
PeForm.ShowModal;
finally
PeForm.Free;
end;
end;
procedure Register;
begin
RegisterPropertyEditor (TypeInfo(LongInt),
TComponent, 'Tag', TTagMultiProperty);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -