TdxTreeViewCustomDrawEvent Type
In This Article
The custom draw procedural type for the Tree View control.
#Declaration
Delphi
TdxTreeViewCustomDrawEvent = procedure(Sender: TdxCustomTreeView; ACanvas: TcxCanvas; AViewInfo: TdxTreeViewViewInfo; var AHandled: Boolean) of object;
#Parameters
Name | Type | Description |
---|---|---|
Sender | Tdx |
The Tree View control that raised a custom draw event. |
ACanvas | Tcx |
The Sender Tree View control’s canvas. |
AView |
Tdx |
The Tree View control’s View |
AHandled | Boolean | Assign |
#Remarks
The following OnCustomDraw event handler changes the default background color of the Tree View to blue:
procedure TForm1.dxTreeViewControl1CustomDraw(Sender: TdxCustomTreeView;
ACanvas: TcxCanvas; AViewInfo: TdxTreeViewViewInfo; var AHandled: Boolean);
begin
ACanvas.Brush.Color := clSkyBlue;
ACanvas.FillRect(AViewInfo.Bounds);
end;
The Tree View’s OnCustomDraw event references the TdxTreeViewCustomDrawEvent type.
See Also