function TextSize(MaxWidth: Integer = 0; AllowWrapping: Boolean = True): TSize;
Description
Returns the size (in pixels) of the content of the control. MaxWidth specifies the maximum allowable width (in pixels), e.g. you can use the control width.
If MaxWidth = 0, it just returns TextWidth x TextHeight.
If AllowWrapping = True (assumes MaxWidth > 0), the text will be wrapped at the specified width.