Alright! Cool. Thx DK. Ok so, I figged this needed to be told in the ScrollViewer docs, so I started that.
In the middle of writing about how multiple textBlocks could be added to a stackPanel, and then THAT stackpanel could become ScrollViewer’s single allowed child… I got a little brain tumor.
Right away, we notice that this gives us multi-font-styles and text colors/weights/sizes… inside of a single ScrollViewer… which is excellent! But then… I made a BIG mistake. I thought: “I wonder what OTHER controls could be put into that stackpanel, and would work fine.” WHY did I need to think about THAT? Geez, Wingy.
I was SO SO HOPING that ONLY textBlocks would be allowed in a “stack-scroller”. But nooooo…
https://www.babylonjs-playground.com/#AMYR5C#36 lines 88-93
Images are allowed, too (even though I can’t seem to get any space UNDER the image). Holy crap huh?
So now… my docs mod looks like this…
Live-Updating and Multiple TextBlocks
The ScrollViewer accepts only ONE textblock child. You can modify its .text property, including \n linebreaks, to add/remove text content, using that single textBlock’s font styles.
The ScrollViewer also accepts a single StackPanel for a child, and you may add/remove textBlocks (and possibly OTHER types of controls) to\from that stack panel.
Is that good enough, or should we determine WHICH controls are allowed inside a “stack-scroller” and which aren’t? I just got a tumor from thinking about all the possibilities. Ellipse works, too. Oh gosh.
Should we try to add the entire Grid control used in DK’s monster particle editor? (omg).
Can ANYTHING stop a stack-scroller? I bet a lines/multi-lines will screw it up. I tried the sprite animator thingy… and that landed at screen-bottom, outside the scroller-box. So we know at least ONE thing can baffle it.
Time for a contest? See who can get the MOST all-different control-types to work fine inside a stacky scrollViewer? YEAH!