Getting buttons to align in a selectBox

Hello,
I’m using a select box with some text and a slider. I have about 4 buttons I need to have. These buttons will send the user to a different page. However at the moment they all seem to stack on to p of each other.
I saw this article but there was no PG so it wasn’t clear on how to set this up:

This is more similiar to what I’d like to do: Alignment MeshButton3D to do User Interface? but within a text box.

Here is a PG to show my issue. I’d like for buttons 0 and 1 to be next to each other. maybe there is a setting I’m missing?
https://www.babylonjs-playground.com/#1YTZAC#36

Thanks!

Hey!
As far as I know, you can’t add “ButtonGroups” to the SelectionPanel :thinking:
Check the How-To here: Use the Selection Panel Helper - Babylon.js Documentation

It seems it only supports Sliders, Radiobuttons and Checkboxes!
Guess you need to modify it or build your own control and put those buttons into a Stackpanel (like this in your example):
https://www.babylonjs-playground.com/#1YTZAC#37

But yeah its not in the rectangle of the SelectionHelper :sweat_smile:

2 Likes

Pinging @JohnK who is the author of the SelectionPanel

@Strix, wulf11 is correct it was always a simple structure only ever designed for those controls as a quck way to change variables with a project.

You best approach would be a grid or scrollViewer

Thanks! this is just what I needed to know.
~Shane