iOSGraphics.DrawTextLine

From Xojo Documentation

Method

iOSGraphics.DrawTextLine(value As Text, x As Double, y As Double, maxWidth As Double = -1.0, alignment As Xojo.iOSTextAlignment = iOSTextAlignment.Left, truncate As Boolean = False)

Supported on Mobile(iOS).

Draws a single line of text.

Sample Code

From within an iOSCanvas.Paint event handler:

g.FillColor = Color.Blue
Dim t As Text
t = "Hello, World!"
g.DrawTextLine(t, 0, 10, -1, iOSTextAlignment.Left, False) // Left-aligned
g.DrawTextLine(t, 0, 10, -1, iOSTextAlignment.Center, False) // Centered
g.DrawTextLine(t, 0, 10, 100, iOSTextAlignment.Right, False) // Right-aligned