0
点赞
收藏
分享

微信扫一扫

FastReport VCL开发人员手册:脚本系统中的组件注册

半夜放水 2022-09-29 阅读 57


FastReport VCL是用于 Delphi、C++ Builder、RAD Studio 和 Lazarus 的报告和文档创建 VCL 库。它提供了可视化模板设计器,可以访问 30 多种格式,并可以部署到云、网站、电子邮件和打印中。


要从脚本中引用我们的组件,需要在脚本系统中注册其类、属性和方法。注册代码,根据FastReport的要求,可以放在与组件代码文件同名的文件中,添加RTTI后缀(例如本例中的frxBitBtnRTTI.pas)。查看更多关于课程
FastScript 脚本库文档中的注册、方法和属性。

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 right here }
{ for example, AddClass(TfrxAnotherControl, 'TfrxDialogControl'); }
end;
end;

initialization
fsRTTIModules.Add(TFunctions);

end.

如果您对 FastReport 感兴趣,欢迎加入 FastReport QQ 交流群:702295239



举报

相关推荐

0 条评论