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

TcxTreeListStyles.OnGetColumnFooterStyle Event

In This Article

Occurs whenever a column’s footer cell needs repainting.

#Declaration

Delphi
property OnGetColumnFooterStyle: TcxTreeListGetColumnFooterStyleEvent read; write;

#Remarks

This event occurs every time a TreeList column footer cell is repainted. This allows you to substitute the assigned column footer cell style by another style.

To change the style, you should write an event handler that passes the existing instance of the TcxStyle class to the control via the AStyle parameter. Note that the AStyle parameter doesn’t represent any TcxStyle instance and is nil by default. So you can’t implement the following code:

AStyle.Color := clBlack

before you assign a TcxStyle instance to it.

The following code is not recommended either:

AStyle := TcxStyle.Create;

In this case, a TcxStyle instance will be created every time the event occurs and will never be deleted until application termination. Implementing the above code creates excessive TcxStyle instances and excessive memory usage as the result. The correct method is to create a TcxStyle instance outside the event handler and pass it to the control via the AStyle parameter within the event handler. For instance, you can use the StyleRepository to create and store your custom styles.

Sender specifies the TreeList control.

AColumn specifies the column whose footer cell is about to be painted.

AFooterItem specifies summary options.

The initial style for column footer cells is determined by the TcxTreeListStyles.ColumnFooter property.

See Also