Skip to main content

TcxCustomPivotGrid.OnCustomDrawFieldHeader Event

Enables you to custom paint a field header.

Declaration

property OnCustomDrawFieldHeader: TcxPivotGridCustomDrawFieldHeaderEvent read; write;

Remarks

The Sender parameter specifies the pivot grid whose field header is about to be painted.

The ACanvas parameter specifies the drawing surface.

The AViewInfo parameter provides information (a ViewInfo object) for rendering the field header.

Pass True as the ADone parameter to prevent default painting.

The following code example shows how to handle the OnCustomDrawFieldHeader event to horizontally center field header captions.

procedure <Form>.<PivotGrid>CustomDrawFieldHeader(Sender: TcxCustomPivotGrid; ACanvas: TcxCanvas; AViewInfo: TcxPivotGridFieldHeaderCellViewInfo; var ADone: Boolean);
begin
  AViewInfo.AlignHorz := taCenter;
end;
See Also