TextView(native)
This class implements text viewer and text editor.
Properties
-
autoSize : Symbol
Gets or sets auto-size flag of this TextView;
-
cursor : Multivalue
Gets position pair (line, char).
-
cursorPos : Integer
Cursor position in text (from the beginning).
-
cursorRect : Multivalue
Four values (left, top, right, bottom), represents cursor position and size.
-
focusable : Boolean
Ability to have a focus.
-
height : Integer
Height of the object (in pixels).
-
horzAlign : Symbol
Determines horizontal text position.
-
left : Integer
X - coordinates of the TextView's location.
-
marginX : Integer
Width of the left and right margin.
-
marginY : Integer
Width of the top and bottom margin.
-
multiLine : Boolean
Gets or sets multi-line flags of this TextView.
-
name : String
Name of the TextView object.
-
paint : Paint
Paint object used to draw text inside the object. Thanks to this property, developer can set text size, color, font etc.
-
readOnly : Boolean
Gets or sets read-only flags of this TextView.
-
stretch : Symbol
Gets or sets if the view's width is stretchable.
-
text : String
Text in the object.
-
top : Integer
Y - coordinates of the TextView's location.
-
visible : Boolean
Visibility of the object. True = visible, false = invisible
-
width : Integer
Width of the object (in pixels).
Methods
-
backspace() : TextView
Backspace function removes char at the current position. This function is usually used as a reaction on backspace key.
-
detach() : TextView
Remove object from superior view object (application, form etc).
-
doCursorKey(key) : TextView
Sends request of cursor key to TextView.
-
setFocus() : Boolean
Returns true if TextView has focus. Otherwise, function returns false.
-
insert(char) : TextView
Insert char at current position.
-
invalidate([left, top, right, bottom]) : TextView
This function ensure redrawing a rectangle, determined by parameters. If no parameters are set, whole object will be redraw. Redrawing manages the function, which is set to onDraw event.
-
replace(key) : TextView
Replace char at current position in TextView by new char.
-
setFocus() : Boolean
Function sets focus to the TextView object.
-
this(name = null) : TextView
Create new TextView object.
Events
-
onChar(sender, charCode)
This event is raised by release an UNICODE character key.
-
onDraw(sender, canvas)
This event occurs, when it is necessary to redraw object.
-
onKeyPressed(sender, key)
This event is raised by press the key.
-
onKeyReleased(sender, key)
This event is raised by release the key.
-
onPointerDragged(sender, x, y)
Called when touch (click) is moved.
-
onPointerPressed(sender, x, y)
Called when touch (click) is stared.
-
onPointerReleased(sender, x, y)
Called when touch (click) is finished.
-
onProcess()
Callback function, which is which is called from the object every 25ms.
-
onResize(sender, width, height)
Occurs when the control is resized.
|
|
 |
Window
|
|
 |
View
|
|
 |
StackLayout
|
|
 |
ScrollView
|
|
 |
TextView
|
|