iOSGraphics.TextBlockSize

From Xojo Documentation

Method

iOSGraphics.TextBlockSize(value As Text, maxWidth As Double = -1.0, maxHeight As Double = -1.0, alignment As iOSTextAlignment = iOSTextAlignment.Left, truncateLastLine As Boolean = False) As Xojo.Core.Size

Supported on Mobile(iOS).

Calculates the size of a text as it would appear using DrawTextBlock.

Sample Code

Get the text block size of left-aligned text:

Var tbs As Size
tbs = g.TextBlockSize("Hello, world!", -1, -1, iOSTextAlignment.Left, False)