0 votes

When creating a button group and adding checkboxes, I get the radio button style that I was looking for. However, every checkbox is listed vertically and I can't seem to get them to fill in horizontally.

I have:

  • ButtonGroup
    -- Option1
    -- Option2

And that's how it renders. So I want to have the the visual listed vertically like:

( ) Option1 ( ) Option2...

However Button group is forcing a top down selection list. I feel I'm just missing something simple. Any Ideas?

in Engine by (57 points)

1 Answer

+4 votes
Best answer

Try adding an HBoxContainer as a parent for your options - they'll still work as exclusive radios even if they're not direct children of the ButtonGroup, so this hierarchy is fine and should create the layout you need:

  • ButtonGroup
    -- HBoxContainer
    ---- Option 1 (CheckBox)
    ---- Option 2 (CheckBox)

Note that the HBoxContainer, unlike the ButtonGroup, only applies its special container mojo (in this case, the horizontal layout) to its direct children. So you can have as many other layers of node hierarchy as you want between ButtonGroup and the HBox, but none between the HBox and the options.

by (338 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.