I gotta admit that was a bit tricky one, but i figured out a legit solution. But thats really really complex!!!
First, i would recommend a large empty space to work on, if its not a superflat world
Now lemme explain what happens, your button is actually connected to a command block that summons a minecart some 15-20 blocks above ground using /summon command. On the ground, there is a three block high staircase having rails on the upper and lower stairs, but a detector rail on the second stair. Make sure the minecart is summoned in such a way that it falls exactly on this detector rail. This detector rail is connected with redstone wire to power whatever the hell you want to and also to a command block which uses the /clone command to clone these three staircases just above the first one, ,i.e., exactly above the block having the rail on the upper stair. Now the next time you press the button, the minecart falls on these second set of staircase, thus powering the detector rail on its second stair. Again, this detector rail shall be connected to an outlet and a command block that clones the staircase once again above it such that now you have three different staircase sets all on the top of each other but physically seperated. This time when the minecart is summoned, it spawns exactly on the detector rail of this third staircase set which again has its own outlet and a command block. but this time, this command block is connected with a repeater to delay the signal a bit and also, it must have a /fill command to fill all the blocks accommodated by the second and third set of staircases with air blocks and thus, you can now see only your first set of staircase which always stays on the ground. Now the next time you'll press the button the first signal would be toggled. Make sure at the foot of the staircase is a puddle of lava in the ground so that whenever the next minecart arrives, it pushes the previous one into lava and demolishes it.
You're done!! (PHEW!! THANKS FOR READING THIS LONG!!)
Ok, if you are talking about a button selected panel, here is how. Make a dropper pointing into a hopper connected into a not gate, then connect the button to two more not gate to the previous not gate. Now connect another input to the butttons into a monostable circuit into the dispenser. I think that's how it works