Perhaps you could put them in Groups instead of in an accordion. Place all the Groups in the same location with the same dimensions. Then set the visibility to cycle through the different groups. Here is a proof-of-concept sketch that cycles through two groups by pressing the SPACE bar. This concept can of course be used for more groups and cycling could be triggered by anything (for example other buttons).
very clever! ^:)^ (it took me quiet some time to understand how it works)
but this are my requirements:
- use the navi per buttons (f.e. radioButtons or Tabs(wich are on the top))
- don't see the background from the groups
- don't see the label-bar
- only one can be open (yes it works)
what would you prefer, make it with groups or otherwise?
and would you use with this requirements accordion additional?
Just try some things and look at the javadocs. For example to not see a background in the groups you can just remove the line .setBackgroundColor() and to remove the bar you can just add the line .hideBar() etc.
Indeed very clever! My approach was always to make a function to set everything false.
And only then make the selectedtrue! 8-|
However, I still think my simpler approach is slightly faster! :P
Answers
No, but take a look at the ControlP5 Accordion example, perhaps it is something you can use if you comment out two lines and add a line like this:
yes, it works really great, but the "tabs" from the accordion should be always on the top.
i have another idea to solve it: (about radio-Buttons) >-)
is there any option to make it like this? what should i do for it?
Perhaps you could put them in Groups instead of in an accordion. Place all the Groups in the same location with the same dimensions. Then set the visibility to cycle through the different groups. Here is a proof-of-concept sketch that cycles through two groups by pressing the SPACE bar. This concept can of course be used for more groups and cycling could be triggered by anything (for example other buttons).
Proof-Of-Concept
very clever! ^:)^ (it took me quiet some time to understand how it works)
but this are my requirements:
- use the navi per buttons (f.e. radioButtons or Tabs(wich are on the top))
- don't see the background from the groups
- don't see the label-bar
- only one can be open (yes it works)
Just try some things and look at the javadocs. For example to not see a background in the groups you can just remove the line .setBackgroundColor() and to remove the bar you can just add the line .hideBar() etc.
Indeed very clever! My approach was always to make a function to set everything
false
.And only then make the selected
true
! 8-|However, I still think my simpler approach is slightly faster! :P
thanks for your help. i could make it. and now it works perfectly (*)
here is my code:
Great! :-)