Sign in Join
FPDoc Onlineexperiment

TControl.FindSubComponent function

Member of TControlpublicIn unit Controls

Finds the sub-component with the specified name in the Components property.

Declaration

pascal
function FindSubComponent(AName: string): TComponent

Arguments

AName

Parentage/path for the sub-component to retrieve in the method.

Function result

The component with the specified name, or Nil when not found.

Description

FindSubComponent is a TComponent function used to get the sub-component with the name specified in AName. FindSubComponent is similar to TComponent.FindComponent, but accepts a prefixed component name in AName. For example: 'LabeledEdit1.EditLabel'.

FindSubComponent separates the value in AName into the owner and sub-component names. When a prefix is used, the FindComponent method is called to locate the TComponent instance with the owner name. Its FindComponent method is called to get the component with the sub-component name that is used in the return value. If a prefix is not used, the initial component is used as the return value.

The return value is Nil if a component is not found with the specified name.

See also

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