彩票走势图

FastReport VCL报表控件开发者手册一:

原创|其它|编辑:郝浩|2012-11-26 16:04:06.000|阅读 2379 次

概述:本文主要介绍FastReport VCL报表的的类层次结构中的"TfrxComponent"基类。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

相关链接:

"TfrxComponent"是所有FastReport组件的基类,这种类型的对象拥有“coordinates”, “size”, “font” ,“visibility” 以及一系列子对象。该类用过多种方法,允许保存和恢复对象状态。本文主要介绍FastReport VCL报表的的类层次结构中的"TfrxComponent"基类。

TfrxComponent = class(TComponent)
protected
procedure SetParent(AParent: TfrxComponent); virtual;
procedure SetLeft(Value: Extended); virtual;
procedure SetTop(Value: Extended); virtual;
procedure SetWidth(Value: Extended); virtual;
procedure SetHeight(Value: Extended); virtual;
procedure SetFont(Value: TFont); virtual;
procedure SetParentFont(Value: Boolean); virtual;
procedure SetVisible(Value: Boolean); virtual;
procedure FontChanged(Sender: TObject); virtual;
public
constructor Create(AOwner: TComponent); override;
procedure Assign(Source: TPersistent); override;
procedure Clear; virtual;
procedure CreateUniqueName;
procedure LoadFromStream(Stream: TStream); virtual;
procedure SaveToStream(Stream: TStream); virtual;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Extended);
function FindObject(const AName: String): TfrxComponent;
class function GetDescription: String; virtual;

property Objects: TList readonly;
property AllObjects: TList readonly;
property Parent: TfrxComponent;
property Page: TfrxPage readonly;
property Report: TfrxReport readonly;
property IsDesigning: Boolean;
property IsLoading: Boolean;
property IsPrinting: Boolean;
property BaseName: String;
property Left: Extended;
property Top: Extended;
property Width: Extended;
property Height: Extended;
property AbsLeft: Extended readonly;
property AbsTop: Extended readonly;
property Font: TFont;
property ParentFont: Boolean;
property Restrictions: TfrxRestrictions;
property Visible: Boolean;
end;

  • Clear:清除对象内容,并删除它的所有子对象
  • CreateUniqueName:创建对象的唯一名称
  • LoadFromStream:加载对象以及流中的所有子对象
  • SaveToStream:保存对象到流
  • SetBounds:设定对象的坐标和大小
  • FindObject:在子对象中搜索指定了名称的对象
  • GetDescription:返回对象描述

当你修改相应的属性时候,会调用下列方法。如何你需要额外处理,你需要覆盖它们。

- SetParent
- SetLeft
- SetTop
- SetWidth
- SetHeight
- SetFont
- SetParentFont
- SetVisible
- FontChanged

在“TfrxComponent”类中定义了以下属性:

  • Objects:list of child objects
  • AllObjects:list of all subordinate objects
  • Parent: link to parent object
  • Page:link to report page on which object resides
  • Report link:to report in which object appears
  • IsDesigning: “True” if designer is running
  • IsLoading :“True” if object is being loaded from stream
  • IsPrinting :“True” if object is being printed out
  • BaseName: object base name; this value is used in “CreateUniqueName” method
  • Left object: X-coordinate (relative to parent)
  • Top :object Y-coordinate (relative to parent)
  • Width: object width
  • Height :object height
  • AbsLeft :object absolute X-coordinate
  • AbsTop :object absolute Y-coordinate
  • Font :object font
  • ParentFont: if “True” then uses parent object font settings
  • Restrictionsset of flags which restricts one or more object operations
  • Visible :object visibility

 


标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn

文章转载自:慧都控件网

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP