TComponent::ComponentIndex - C++ Builder

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


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

__property int ComponentIndex = { read = GetComponentIndex, write = SetComponentIndex, nodefault};

System::Classes::TComponent::ComponentIndex 是 System::Classes::TComponent 的属性,一个组件里面可以容纳其他组件,如果这个组件在其他组件里面,这个属性表示它在容纳他的组件 (容器) 里面容纳的第几个组件。

  • 这个控件是在他的 Owner (拥有者) 的 Components 属性里面,是第几个,可读写属性;
  • ComponentIndex 的范围在 0 到 Owner 的 ComponentCount -1 之间;
  • 组件创建时,TComponent 构造函数的参数是这个组件的拥有者 (Owner),这个组件将添加在 Owner 的容纳的组件里面;
  • 可以用 InsertComponent 和 RemoveComponent 增加和删除容纳的组件。

参考:

  • System::Classes::TComponent::Components
  • System::Classes::TComponent::ComponentCount
  • 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 ➙ ComponentIndex

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