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.TextHeight(string) Method

Returns the height of a specified string, in pixels.

#Declaration

Delphi
function TextHeight(const Text: string): Integer;

#Parameters

Name Type
Text string

#Returns

Type
Integer

#Remarks

Call the TextHeight and TextWidth functions and pass a string as the Text parameter to identify the string’s dimensions at the current Font settings. This is useful if you need to calculate other UI element sizes and positions to accommodate text properly.

See Also