Hiya F!
No solution, but I have created a testing playground…
https://www.babylonjs-playground.com/#3EF49E#75
There we have a stackPanel (line 32) and it contains 4 “controls” as children. First 3 are inputText controls (slightly different from each other)… and the 4th is a ScrollViewer control… a type of multi-line text thing.
THIS scrollViewer is slightly different than normal. ScrollViewers can have TWO types of controls within them:
- A single textBlock control
- A single vertical StackPanel … which can contain MANY controls of MANY kinds.
Shown… is the 2nd version… a scrollViewer with a vertical stackPanel inside… which has 3 children… a textBlock, then a rectangleControl (a nice border-able container for nearly ANYTHING including more stackPanels)… and then another textBlock.
SO, by using a stackPanel in the ScrollViewer… we have super-powered the ScrollViewer… allowing us to live-update the scrollViewer… by adding and removing textBlocks/anyControls. We might have to markAsDirty after additions and deletions
The most important thing… we have a text “area” that is wordWrapping and vertical-scroll-bar ACTIVE… AND can be updated live.
Now, back to the 3 inputText controls… and in particular… look at line 39 of the FIRST inputText control. We have an “observer”… it can watch for keypresses, and can “notify” us/other-things… WHEN a key has been pressed. Hmm.
You know where this is going, now, right? We watch for keypresses… and possibly change the .text of ANY textBlock control… ANYWHERE (like one that is inside-of the scrollViewer)… EACH keypress.
A person MIGHT want to put that first inputText control… as the first child of the stackPanel that is INSIDE-OF the scrollViewer (and maybe just remark-out input1 and input2, which are simply included for us to look-at and learn-from).
I dunno IF input.onBeforeKeyAddObservable CAN be used to write text into a scrollViewer… but maybe. By using a combination of controls such as these… a person MIGHT be able to “fake” a wordwrapping, side-scroll-active multi-line textArea simulator.
I don’t know if I will continue working on the demo/testing today, because my town just got another 10 inches of snow from a spring storm, and I have snow-cleanup work to do… soon. Perhaps you and/or other helpers… would like to advance this possibility. It’s something to try… what the heck.
You might want to somewhat/somehow hide the single-line inputText control, or at least hide/delete its outputted text… as you feed each keypress from it… into the scrollViewer textBlock(s)… thx to the input.onBeforeKeyAddObservable.
Good luck! Attn: SNOW FOR SALE! CHEAP! FREE SHIPPING!