TdxTreeViewCustomDrawNodeEvent Type
In This Article
The custom draw procedural type for tree nodes.
#Declaration
Delphi
TdxTreeViewCustomDrawNodeEvent = procedure(Sender: TdxCustomTreeView; ACanvas: TcxCanvas; ANodeViewInfo: TdxTreeViewNodeViewInfo; var AHandled: Boolean) of object;
#Parameters
Name | Type | Description |
---|---|---|
Sender | Tdx |
The Tree View control that raised a custom draw event for a node. |
ACanvas | Tcx |
The Sender Tree View control’s canvas. |
ANode |
Tdx |
View |
AHandled | Boolean | Assign True to this property to override the built-in node draw routine. Do not change this parameter value if you only need to add custom draw operations to the built-in routine. |
#Remarks
The following OnCustomDrawNode event handler applies the italic font attribute to a selected node’s caption:
procedure TForm1.dxTreeViewControl1CustomDrawNode(Sender: TdxCustomTreeView;
ACanvas: TcxCanvas; ANodeViewInfo: TdxTreeViewNodeViewInfo;
var AHandled: Boolean);
begin
if ANodeViewInfo.Node.Selected then
ACanvas.Font.Style := ACanvas.Font.Style + [fsItalic];
end;
The Tree View’s OnCustomDrawNode event references the TdxTreeViewCustomDrawNodeEvent type.
See Also