RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DesignIntf.RegisterPropertiesInCategory Function

Registers multiple properties in a specific property category.

Pascal
procedure RegisterPropertiesInCategory(const CategoryName: string; const Filters: array of const); overload;
procedure RegisterPropertiesInCategory(const CategoryName: string; ComponentClass: TClass; const Filters: array of string); overload;
procedure RegisterPropertiesInCategory(const CategoryName: string; PropertyType: PTypeInfo; const Filters: array of string); overload;
C++
RegisterPropertiesInCategory(const AnsiString CategoryName, const array of const Filters);
RegisterPropertiesInCategory(const AnsiString CategoryName, TClass ComponentClass, const array of string Filters);
RegisterPropertiesInCategory(const AnsiString CategoryName, PTypeInfo PropertyType, const array of string Filters);

Call RegisterPropertiesInCategory to associate several properties at once with a specific category. Then, when the Object Inspector displays properties by category, those properties appear under the associated category. 

RegisterPropertiesInCategory comes in three overloaded variations, each providing a different set of criteria for identifying the property to be associated with property categories. 

CategoryName is the name of the category. This is the string that appears in the Object Inspector's "View" menu item. 

Filters is a set of property names or types that identify properties to be associated with the category. If Filters is an array of strings, it lists only property names. If it is an array of const, it can include types as well.

Note: In C++, Filters_Size is the index of the last name or type in Filters (one less than the number of elements).
ComponentClass is the class of a component whose properties are to be associated with the category. 

PropertyType is a type information record that describes the type of the properties 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++. 

 

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