原創|其它|編輯:郝浩|2012-11-29 10:08:21.000|閱讀 564 次
概述:若要從腳本中訪問組件,首先需要在腳本系統中對組件類,屬性和方法進行注冊。本文就主要介紹如何在腳本系統(Script System)中進行構件注冊。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
若要從腳本中訪問組件,首先需要在腳本系統中對組件類,屬性和方法進行注冊。你可以將注冊碼存放在一個與組件碼同名的后綴名為 'RTTI'的文件夾中。本文就主要介紹如何在腳本系統(Script System)中進行構件注冊。
uses fs_iinterpreter, frxBitBtn, frxClassRTTI;
type
TFunctions = class(TfsRTTIModule)
public
constructor Create(AScript: TfsScript); override;
end;
constructor TFunctions.Create(AScript: TfsScript);
begin
inherited Create(AScript);
with AScript do
begin
{ register class and then define its parent }
AddClass(TfrxBitBtnControl, 'TfrxDialogControl');
{ if there are several common controls in your unit,
they can be registered here;
for example, AddClass(TfrxAnotherControl, 'TfrxDialogControl'); }
end;
end;
initialization
fsRTTIModules.Add(TFunctions);
end.
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn