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

# TResourceTreeNode.Remove

Removes a resource from the tree

## Declaration

Source position: resourcetree.pp line 54

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

## Arguments

`aType` |  | The type of the resource to remove
`aName` |  | The name of the resource to remove

## Function result

The removed resource, or nil if not found

## Arguments

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

## Description

This method searches for the specified resource and removes it from the tree. If a language ID is not provided, the first resource found that matches aType and aName is returned. The removed resource is then returned.

If no resource is found, nil is returned.

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

## See also

TResourceTreeNode.Add |  | Adds a new resource to the tree

Documentation generated on: May 14 2021