### Insert Text at Caret Position

To insert text at caret (cursor) position make use of the JavaObject (Library JavaObject).
Find more info:
http://docs.oracle.com/javafx/2/api/javafx/scene/control/TextInputControl.html
' Insert text at caret position for a textarea
' Parameter TextArea
' Parameter String to insert
' Example: TextAreaInsertText(TextArea1, "Now = " & DateTime.Time(DateTime.Now))
`Sub TextAreaInsertText(ta As TextArea, s As String)
Dim jo As JavaObject = ta
Dim npos As Int = jo.RunMethod("getCaretPosition", Null)
If npos < 0 Then Return
jo.RunMethod("insertText", Array As Object(npos, s))
End Sub`

Changed: , Category: TextArea, File: T6C261M1926.htm, ID: 1926