From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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)