type
TVirtualTreeEditor = class (TDefaultEditor)
public
procedure Edit; override; // этот метод был
procedure ExecuteVerb(Index: Integer); override; // остальные - добавил
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
procedure TVirtualTreeEditor.ExecuteVerb(Index: Integer);
begin
inherited;
ShowMessage('Verb '+IntToStr(Index));
end;
function TVirtualTreeEditor.GetVerb(Index: Integer): string;
begin
if Index = 0 then
Result:='VT action';
end;
function TVirtualTreeEditor.GetVerbCount: Integer;
begin
Result:=1;
end;
更新,关于 DescriptionPane:
IPropertyDescription实现单个方法的接口负责使用 DescriptionPane 面板:function GetDescription: string;如果您在创建的属性编辑器中包含此接口的实现,则在选择该属性时其描述将出现在此面板中。
示例,基于相同的VirtualTreeView:
关于 DescriptionPane 旁边的面板 - HotCommands:
负责使用此面板(以及单击组件时的上下文菜单)
TComponentEditor,即其方法function GetVerb(Index: Integer): string; virtual; function GetVerbCount: Integer; virtual; procedure ExecuteVerb(Index: Integer); virtual;通过在您为组件注册的编辑器中覆盖它们,您不仅可以显示信息,还可以执行必要的操作。例如,我取了 VirtualTreeView 并更改了它的编辑器
并重建了组件的设计包。
这不是一个字段,而是一个面板 -
Status Bar显示系统信息。在这种情况下,属性信息。不知道早期版本有没有这样的机会,但是在以后的版本中你可以禁用这个面板,为此你需要:
Status Bar(面板)或窗口Object Inspecto'аProperties(结果,设置窗口将打开Status Bar'a)Show status bar'a并单击按钮Save“左” - 否(它通常是一个数字,并且该字段被积极用于其预期目的 - 它表示相对于父级的偏移量)。对于简要说明,您可以使用 Hint。但是,最终用户可能会看到此字段!还有一个整数属性 Tag,可以自行决定使用。
组件属性概述:http: //www.delphi.int.ru/articles/106/ - 也许这里有一些对你有用的东西。