TextView
The TextView element, which extends the View interface, is intended for displaying text.
To create a TextView, the function is used:
func NewTextView(session Session, params Params) TextView
The displayed text is set by the string property "text" (Text constant).In addition to the Get method, the value of the "text" property can be obtained using the function
func GetText (view View, subviewID ...string) string
TextView inherits from View all properties of text parameters ("font-name", "text-size", "text-color", etc.).In addition to them, the "text-overflow" int property (TextOverflow constant) is added.It determines how the text is cut if it goes out of bounds.This property of type int can take the following values
Value | Constant | Name | Cropping Text |
---|---|---|---|
0 | TextOverflowClip | "clip" | Text is clipped at the border (default) |
1 | TextOverflowEllipsis | "ellipsis" | At the end of the visible part of the text '…' is displayed |