????????????(50分)

V

vfphome

Unregistered / Unconfirmed
GUEST, unregistred user!
我开发了一个StatusBar ,是从TWinControl继承来的
StatusBar = class(TWinControl)
其中的属性有
Panels =class(TCollection)
Panel =class(TCollectionItem)
我想请教的是:
怎样设置 在设计时 双击构件 即出现系统提供的编辑Panes的属性窗口 .
在线等待.....
 
问问题时,尽量把大概写清楚,否则很多高手都懒得来看了
参照一下我的同类的问题吧,我已经解决了
http://www.delphibbs.com/delphibbs/dispq.asp?lid=1477254
倒数第三帖
使用过程 ShowCollectionEditor
我的代码
TSiteEditor = class(TComponentEditor)
public
procedure ExecuteVerb(Index: Integer);
override;
function GetVerb(Index: Integer): string;
override;
function GetVerbCount: Integer;
override;
end;

{ TSiteEditor }
procedure TSiteEditor.ExecuteVerb(Index: Integer);
begin
if Index = 0 then
begin
ShowCollectionEditor(Designer, Component,
TVirtualSite(Component).WebSiteFiles, 'WebSiteFiles');
end;
end;

function TSiteEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := 'Edit Site files...';
else
Result := '';
end;
end;

function TSiteEditor.GetVerbCount: Integer;
begin
Result := 1;
end;

 
接受答案了.
 
你的属性如果是正确的,应该自动在属性窗口显示...的。可看VCL的源码。
 
顶部