TComponent::Components - C++ Builder

C++ Builder 参考手册 ➙ TComponent ➙ Components


头文件:#include
命名空间:System::Classes
类:TComponent
访问权限:public:
属性定义:

__property TComponent* Components[int Index] = { read = GetComponent };

System::Classes::TComponent::Components 是 System::Classes::TComponent 的属性,获取这个组件容纳的第 Index 个子组件。

  • 这个组件作为容器,里面可以拥有和容纳其他组件,这些拥有的组件的 Onwer 就是这个组件;
  • Components 属性为这个控件拥有的其他组件的列表,返回第 Index 个拥有的组件,Index 的范围为 0 ~ ComponentCount - 1;
  • 组件创建时,TComponent 构造函数的参数是这个组件的拥有者 (Owner),这个组件将添加在 Owner 的容纳的组件里面;
  • 可以用 InsertComponent 和 RemoveComponent 增加和删除容纳的组件。

参考:

  • System::Classes::TComponent::ComponentCount
  • System::Classes::TComponent::ComponentIndex
  • System::Classes::TComponent::ComponentState
  • System::Classes::TComponent::ComponentStyle
  • System::Classes::TComponent::FindComponent
  • System::Classes::TComponent::InsertComponent
  • System::Classes::TComponent::RemoveComponent
  • System::Classes::TComponent::Owner
  • System::Classes::TComponent::TComponent
  • System::Classes::TComponent
  • System::Classes::TPersistent
  • System::TObject
  • PME 架构
  • VCL 类继承关系

C++ Builder 参考手册 ➙ TComponent ➙ Components

你可能感兴趣的:(TComponent::Components - C++ Builder)