Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.DrawBuiltinIcon function

Member of TCustomTreeViewprotectedIn unit ComCtrls

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

Declaration

pascal
function 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.

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