Toggle Group Tutorial

Anyone have or know of a tutorial that shows how to use a ToggleGroup?
I’m on a new app(2d) with the option of two selections

x Selection A x Selection B
x option 1 x option 1
x option 2 x option 2
x option 3 x option 3

If you toggle selection A you see A’s options 1,2,3
If you toggle selection B you see B’s options.
Only one selection can show its options at one time. If I understand a togglegroup, this should be easy, but the how is eluding me.
Thanks in advance!

the trick is to declare one static bool in the editor class for your custom editor.
then use it like this (pseudo-code):

static bool wahl = true;

toggle(A) -> wahl  := true
toggle(B) -> wahl := false

if (wahl) -> viewGroupA
else viewGroupB

If you have more than two selections, simply use an integer or a custom enumeration :wink: