Moscrif.TextView Class
This class implements text viewer and text editor.
Item Index
Properties
Methods
this
[name=null]
Create new TextView object.
Parameters:
-
[name=null]
String optionalName of the object. Pass null for unnamed control.
Returns:
detach
()
Remove object from superior view object (application, form etc).
insert
char
Insert char into text view.
Parameters:
-
char
Integer(Uni)code of char to be inserted.
invalidate
[left]
[top]
[right]
[bottom]
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.
Parameters:
replace
key
Replace char at current position in TextView by new char.
Parameters:
-
key
Integer(Uni)code of new char to be replaced.
replace
()
Backspace function removes char at the current position. This function is usually used as a reaction on backspace key.
Properties
autoSize
Symbol
Gets or sets auto-size flag of this TextView:
- #fixed
- #width
- #height
horzAlign
Symbol
Determines horizontal text position.
- #left
- #center
- #right
paint
Paint
Paint object used to draw text inside the object. Thanks to this property, developer can set text size, color, font etc.
stretch
Symbol
Gets or sets if the view's width is stretchable. * #hor * #vert * #both
Events
doCursorKey
Sends request of cursor key to TextView.
Event Payload:
-
key
SymbolKey symbols:
- #leftSoftKey
- #rightSoftKey
- #home
- #back
- #send
- #end
- #num0 - #num9
- #star - the * key
- #hash - the # key
- #up
- #down
- #left
- #right
- #ok
- #volumeUp
- #volumeDown
- #power
- #camera
onChar
This event is raised by release an UNICODE character key.
Event Payload:
-
sender
ObjectObject which caused this event.
-
key
IntegerCode from unicode table.
onDraw
This event occurs, when it is necessary to redraw object.
Event Payload:
-
sender
ObjectObject which caused this event.
-
canvas
CanvasCanvas object enabling drawing to the TextView.
onKeyPressed
This event is raised by press the key.
Event Payload:
-
sender
ObjectObject which caused this event.
-
key
SymbolPressed key.
- #leftSoftKey
- #rightSoftKey
- #home
- #back
- #send
- #end
- #num0 - #num9
- #star - the * key
- #hash - the # key
- #up
- #down
- #left
- #right
- #ok
- #volumeUp
- #volumeDown
- #power
- #camera
onKeyReleased
This event is raised by release the key.
Event Payload:
-
sender
ObjectObject which caused this event.
-
key
SymbolPressed key.
- #leftSoftKey
- #rightSoftKey
- #home
- #back
- #send
- #end
- #num0 - #num9
- #star - the * key
- #hash - the # key
- #up
- #down
- #left
- #right
- #ok
- #volumeUp
- #volumeDown
- #power
- #camera
onPointerDragged
Called when touch (click) is moved.
onPointerPressed
Called when touch (click) is stared.
onPointerReleased
Called when touch (click) is finished.
onProcess
Callback function, which is which is called from the object every 25ms.