【发布时间】:2013-12-02 21:08:46
【问题描述】:
如果我们从 TDbGrid 派生一个组件,我们可以在 ExecuteVerb 方法中使用 ShowCollectionEditor 来调用它的组件编辑器, 那么,TTreeView 的组件编辑器是什么? 我的意思是当我们右键单击 TreeView 时,我们可以看到“项目编辑器..” 我们如何调用它?
我尝试使用这个:
procedure TComponentExMenu.ExecuteVerb(Index: Integer);
begin
case Index of
0: ShowMessage('SomeThing..');
1:
if Component is TMyDBGrid then
ShowCollectionEditor(Designer, Component, TMyDBGrid(Component).Columns, 'Columns')
else if Component is TMyTreeView then
inherited ExecuteVerb(0)
end;
end;
但不起作用。
我的组件是从 CustomTreeView 派生的。 我用的是delphi 7。
谢谢大家。
【问题讨论】:
标签: delphi treeview editor components delphi-7