[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomTreeView.DrawBuiltinIcon

Defines a method used to draw a built-in icon for a specified tree node.

## Declaration

Source position: comctrls.pp line 3615

`protected function TCustomTreeView.DrawBuiltinIcon(`
`ANode: TTreeNode;`
`ARect: TRect`
`):TSize; virtual;`

## Arguments

`ANode` |  | Tree node used to select an appropriate icon image.
`ARect` |  | Rectangle where the icon image was drawn.

## Function result

TSize instance with the dimensions for the built-in image.

## Description

DrawBuiltInIcon is a virtual method which is used to draw the a built-in icon for the specified tree node. A built-in icon is provided by the operating system or platform when an image list has not been provided or populated in the Images property.

The return value contains a TSize instance with the dimensions for the built-in image. In TCustomTreeView, the method returns an empty TSize instance (CX and CY are both set to 0). The method must be overridden in a descendent class (like TShellTreeView) to use the icon(s) appropriate for the implementation.