Exclusive Radio Buttons

I understand there are ways of doing this manually, but is there an inbuilt function for grouping radio buttons so they are mutually exclusive? i.e. Click one radio button in a group and the rest turn off.

I’d hate to mention another engine for the fear of “Why don’t you just go back to Unity!?” but making GUIs there seemed far easier and this subject fuinction was as simple as creating a group and adding radio buttons to it.

There is not. But it takes just a couple of minutes to set it up:

1 Like

i find this actually to be an issue as well.
i wish this would be integrated on the engine.
i ended up doing my own group box. i hope i can open source it soon.

@Everynone
The state seems not to work, it´s always “true”.

Open a new thread, post script. No one can help without seeing what you’re doing.

Sorry for not being clear here.
I am referring to your solution and rebuilt it for myself.
The checkboxes are working fine, but the one being unchecked, doesn´t fire anything.
So the state output is always true, or am I wrong?:

How’s this part on your end:

And how are you testing it being true?

Looks exactly like yours.
Adding a print string to check what´s being output:
image

It’s the same setup as:

image

Replicated it so see if it is, perhaps, a 5.x bug. It does not seem like it. If you have a more complex setup than this, strip it down.


If it’s manageable, consider opening a new thread and post the whole thing.

I expected a Radiobutton that is checked would not be possible to be unchecked by clicking on it again.
In this case indeed “false” gets printed out.
Seems logical to me now.
Thank you very much for helping!

By the way:
When I (un)check a checkbox “A” by another checkbox “B” the “OnCheckStateChanged”-event of “A” is not being called, right?
Coming from Unity this is new to me:
We had to (un)check “A” doing it “silently” otherwise it would call its events.

1 Like