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

TdxCustomListBoxReportLink.OnCustomDrawItem Event

In This Article

Occurs when drawing a specific item within a list box control.

#Declaration

Delphi
property OnCustomDrawItem: TdxCustomDrawItemEvent read; write;

#Remarks

Write an OnCustomDrawItem event handler to draw a specific listbox item based on your specific requirements. The ACanvas parameter determines the drawing surface.

Parameter Description
ACanvas Determines canvas for drawing.
ABoundsRect Specifies rectangle including borders for drawing.
AClientRect Specifies rectangle excluding borders for drawing.
AText Determines text that is drawn within an item.
AFont Specifies the font.
AColor Specifies the background color of an item.
ATextAlignX Specifies horizontal text alignment within an item.
ATextAlignY Specifies vertical text alignment within an item.
ADone Determines whether the OnCustomDrawItem event handler entirely draws an item. If ADone is True, the default drawing procedure is not called.

In order to specify the color, font, text or alignment, used for drawing the header of a specific column, set proper values for the AColor, AFont, AText, ATextAlignX or ATextAlignY parameters and set ADone to False within the OnCustomDrawItem event handler.

See Also