Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomPivotGrid.OnCustomDrawFieldHeader Event

In This Article

Enables you to custom paint a field header.

#Declaration

Delphi
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