- TComponent::SetName - C++ Builde
- TComponent::Updated - C++ Builde
- TComponent::TComponent - C++ Bui
- TComponent::~TComponent - C++ Bu
- TComponent::ValidateContainer -
- TComponent::WriteState - C++ Bui
- TComponent::UpdateAction - C++ B
- TComponent::UpdateRegistry - C++
- TComponent::VCLComObject - C++ B
- TComponent::SetParentComponent -
C++ Builder 参考手册 ➙ TComponent ➙ SetName
头文件:#include <System.Classes.hpp>
命名空间:System::Classes
类:TComponent
访问权限:protected:
函数原型:
virtual void __fastcall SetName(const TComponentName NewName);
System::Classes::TComponent::SetName 是 System::Classes::TComponent 的成员函数,给属性 Name 赋值时调用这个方法来修改组件名,SetName 调用 ChangeName 方法来实现改名。
参数:
NewName:组件的新名字;
返回值:
无。
- 给属性 Name 赋值调用这个方法来修改组件名,SetName 调用 ChangeName 方法来实现改名;
- ChangeName 不是 virtual 函数,不要重载 ChangeName,可以用重载 SetName 方法来替代。
参考:
- System::Classes::TComponent::Name
- System::Classes::TComponent::ChangeName
- System::Classes::TComponent
- System::Classes::TPersistent
- System::TObject
- VCL 类继承关系
C++ Builder 参考手册 ➙ TComponent ➙ SetName
网友评论