[Overview][Classes][Index] | Reference for unit 'resourcetree' (#fcl-res)

# TResourceTreeNode.Find

Searches for a resource

## Declaration

Source position: resourcetree.pp line 56

`public function TResourceTreeNode.Find(`
`aType: TResourceDesc;`
`aName: TResourceDesc`
`):TAbstractResource; overload; function TResourceTreeNode.Find(`
`aType: TResourceDesc;`
`aName: TResourceDesc;`
`const aLangID: TLangID`
`):TAbstractResource; overload;`

## Arguments

`aType` |  | The type of the resource to search for
`aName` |  | The name of the resource to search for

## Function result

The resource that matches the search criteria

## Arguments

`aType` |  | The type of the resource to search for
`aName` |  | The name of the resource to search for
`aLangID` |  | The language ID of the resource to search for

## Description

This method searches for a resource with the given type and name in the tree. If a language ID is not provided, the first resource found that matches aType and aName is returned.

If no resource is found, nil is returned.

Remark: | This method should only be called on root nodes (instances of TRootResTreeNode).

Documentation generated on: May 14 2021