i’m trying to make a scrollable list of buttons. I thought to fill a scrollviewer with a grid cointaining all the buttons. The problem is that a can’t make the scrollviewer to scroll.
Here is my PG: https://playground.babylonjs.com/#FS6S0L#4
Thank’s in advance.
- I removed your “rgrid” Rectangle because your Tree is like: Scrollviewer > Rectangle > Grid > Buttons.
- Grid seems to need have a set value for its height to make it scrollable! I just used your RowDefinition value of “40” like this after you created all buttons:
grid.heightInPixels = grid.rowCount*40;
of course you could store the heightInPixels in a variable (just refactor my example)!
Here is the pg:
Thank you so much.
Yes, rgrid was a test: the Tree is exactly what you mentioned.
Now i understand…i have always to set the height in pixel.