使用带参数的属性。例如:
[propget, id(4)] HRESULT ProviderName([in] long index, [out, retval] BSTR *pVal);
[propput, id(4)] HRESULT ProviderName([in] long index, [in] BSTR newVal);
[propget, id(4)] HRESULT ProviderName([in] long index, [out, retval] BSTR *pVal);
[propput, id(4)] HRESULT ProviderName([in] long index, [in] BSTR newVal);
private
FRemoteServer: TCustomRemoteServer;
FProviderName: string;
....
public
published
property RemoterServer: TCustomServer read ....
property ProviderName: string Read ...
end;
我想要写一个属性编辑器继承TStringProperty
TProviderNameProperty = class(TStringProperty)
function GetAttributes: TPropertyAttributes; override;
procedure GetValues(Proc: TGetStrProc); override;
end;
但是TStringProperty在delphi5中是在Dgbinitf.pas中(在delphi5中是一切正常的),在Delphi6中是在DesignEditor.pas中,我是在delphi6开发的这个控件的,所以引用了designEditor.pas,但是这个单元引用了一个叫proxies.pas的单元,编译时提示找不到这个proxies.dcu文件,你说我怎么写这个属性编辑器呢?请高手指点
在Delphi5中,