Is it possible to set the scroll position in a Text Area?
When I load text into the area it always show the end of the text leaving the top out of sight.
Is it possible to set the scroll position in a Text Area?
When I load text into the area it always show the end of the text leaving the top out of sight.
textarea.scrollposition = 0
ScrollPosition isn’t available for an IOSTextArea. I had a case where I had a textarea displaying a log with linefeeds every line. In this case I could use the Split method of Text to adjust and recreate the text content and put that into the textarea, thus controlling what was displayed.
Dim loglines() As Text
Dim loglength As Integer = 40 'Limit log to this many lines
Dim wrappedlines As Integer = 0
loglines = Characters(CurrentCharacter).Log.Split(Text.FromUnicodeCodepoint(13))
If loglines.Ubound > loglength Then 'Truncate
For i As Integer = (loglines.Ubound - loglength) To loglines.Ubound
If loglines(i).Length > 38 Then 'This line will wrap
wrappedlines = wrappedlines + 1
End If
Next
Do Until loglines.Ubound = loglength - wrappedlines
'Limit log to this many lines
loglines.Remove(0)
Loop
End If
LogTextArea.Text = Text.Join(loglines, Text.FromUnicodeCodepoint(13))
Thanks Art I will give it a try