TextShape
From Xojo Documentation
New in 2019r2
Draws a text string in a vector graphics environment.
Properties | ||||||||||||||||
|
Enumerations | |
|
Notes
The X,Y properties specify the center of the text baseline. Text that contain line breaks are not supported. TextShapes can be rotated, but doing so is memory intensive, especially for large strings.
Although they will appear in auto-complete and compile, the Border, BorderColor and BorderWidth properties do not do anything with StringShape.
Use the FillColor property to change the color of the text.
Examples
This example draws text rotated 90 degrees. Put it in the Paint event handler of a Canvas:
s.Value = "Hello World"
s.FontName = "Helvetica"
s.Bold = True
s.Rotation = 3.14159 / 2 // (radians, 90 degrees = pi/2)
s.Y = 100
g.DrawObject(s)
This example aligns the TextShape to the left.
s.X = 20
s.Value = "Hello World"
s.HorizontalAlignment = TextShape.Alignment.Left
g.DrawObject(s)
See Also
ArcShape, CurveShape, FigureShape, FolderItem, Group2D, Graphics, Object2D, OvalShape, Picture, PixmapShape, RectShape, RoundRectShape classes.