Sign in Join
FPDoc Onlineexperiment

TControl.CheckChildClassAllowed function

Member of TControlpublicIn unit Controls

Returns True if the class is allowed for child controls.

Declaration

pascal
function CheckChildClassAllowed(ChildClass: TClass; 
 ExceptionOnInvalid: Boolean): Boolean

Arguments

ChildClass

The class of the intended child control.

ExceptionOnInvalid

When True, raise an exception when the class is not allowed.

Function result

True if the class is allowed for child controls.

Description

Only few controls restrict the class of acceptable child controls. E.g. a PageControl only accepts TTabSheet descendants as children.

Errors

An EInvalidOperation can be generated (see ExceptionOnInvalid).

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.