RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DesignIntf.RegisterPropertyInCategory Function

Registers a single property in a specific property category.

Pascal
procedure RegisterPropertyInCategory(const CategoryName: string; const PropertyName: string); overload;
procedure RegisterPropertyInCategory(const CategoryName: string; ComponentClass: TClass; const PropertyName: string); overload;
procedure RegisterPropertyInCategory(const CategoryName: string; PropertyType: PTypeInfo; const PropertyName: string); overload;
procedure RegisterPropertyInCategory(const CategoryName: string; PropertyType: PTypeInfo); overload;
C++
RegisterPropertyInCategory(const AnsiString CategoryName, const AnsiString PropertyName);
RegisterPropertyInCategory(const AnsiString CategoryName, TClass ComponentClass, const AnsiString PropertyName);
RegisterPropertyInCategory(const AnsiString CategoryName, PTypeInfo PropertyType, const AnsiString PropertyName);
RegisterPropertyInCategory(const AnsiString CategoryName, PTypeInfo PropertyType);

Call RegisterPropertyInCategory to associate a property with a specific category. Then, when the Object Inspector displays properties by category, the property appears under the associated category. 

Properties can be identified by name (for example, all "Font" properties), by type (for example, all properties that are of type TComponentName), or by a combination of one of these and a component type (for example, all Integer properties belonging to a TField descendant). 

CategoryName is the name of the property category with which you are registering a property. 

PropertyName is the name of the property to register. 

PropertyType is the type information record that describes the type of the property being registered. In Delphi, you can use the TypeInfo method to obtain this record for a type. In C++, you can use the typeid method to obtain this record for a class. PropertyType can't be used with simple types in C++. 

ComponentClass is the type of component whose properties fall in the specified category. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!