组件基类TComponent 继承于 TObject--TPersistent, 是所有组件类的基类.
TComponent 具有如下特点:
1. 集成于IDE.
2. 所有权. 具有管理其他组件的能力.
3. Streming & filing.
4. 支持 COM.
5. 可视化组件和非可视化组件.
属性:
1. property ComObject: IUnknown;
组件引用的COM接口;
2. property ComponentCount: Integer;
拥有的组件数目;
3. property ComponentIndex: Integer;
组件在拥有者的组件列表中的索引;
4. property Components[Index: Integer]: TComponent;
拥有的组件清单(Array).
5. property ComponentState: TComponentState;
组件的状态.
6. property ComponentStyle: TComponentStyle;
组件的行为.只读;
7. property Name: TComponentName;
组件的名称;
8. property Owner: TComponent;
拥有者; 只读;
9. property Tag: Longint;
方法:
(略).

本文详细介绍了Delphi中TComponent类的基本特征与属性,包括其作为所有组件基类的角色、集成于IDE的能力、所有权管理机制、支持COM特性等。同时列举了TComponent的重要属性如propertyComObject、propertyComponentCount等。
235

被折叠的 条评论
为什么被折叠?



