Skip to main content
Pie
ra0

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

TcxCanvas.FontHeight(TFont) Method

Returns the height of a string rendered in the current font in pixels.

#Declaration

Delphi
function FontHeight(AFont: TFont): Integer;

#Parameters

Name Type
AFont TFont

#Returns

Type
Integer

#Remarks

Call this function to determine the height of a string written with the font passed as the AFont parameter. Other image elements such as lines, boxes, or additional text lines can then be positioned to accommodate the text height.

See Also