RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TypInfo.PropIsType Function

Determines if a component property is of a particular data type.

Pascal
function PropIsType(Instance: TObject; const PropName: string; TypeKind: TTypeKind): Boolean; overload;
function PropIsType(AClass: TClass; const PropName: string; TypeKind: TTypeKind): Boolean; overload;
C++
Boolean PropIsType(TObject * Instance, const AnsiString PropName, TTypeKind TypeKind);
Boolean PropIsType(TClass AClass, const AnsiString PropName, TTypeKind TypeKind);

PropIsType returns true if the property is of the specified data type.  

In the first form of this function, AClass specifies the component class whose property you want to look at.  

The second form of the function a class Instance replaces AClass.  

In both forms of the function, PropName specifies the property name as a string. If the property has the TypeKind data type, then true is returned. Otherwise false is returned.

Note: If the specified property does not exist, or is not a published property, an EPropertyError exception is thrown.
 

 

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