RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAdapterFields.AdapterCanAddClass Method

Indicates whether the associated adapter supports a specified class of field component.

Pascal
function AdapterCanAddClass(AParent: TComponent; AClass: TClass): Boolean;
C++
__fastcall Boolean AdapterCanAddClass(TComponent * AParent, TClass AClass);

TAdapterActions uses this method internally as part of its implementation for the CanAddClass method. This allows the TAdapterFields object to indicate, at design time, which types of components are valid as members of the WebFields property list. 

AParent is the instance of TAdapterFields to which the child fields are to be added. 

AClass describes the class of the child component to be added to AParent. 

AdapterCanAddClass returns true if the adapter recognizes and supports AClass as a child field, false otherwise. 

AdapterCanAddClass calls the CanAddFieldClass method of its associated adapter to determine whether it accepts the specified field class. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!