Apparent bug in ControlP5 Accordion controller?
in
Contributed Library Questions
•
3 months ago
I've found a characteristic that seems to me to be contradictory to the intent of the Accordion. In single mode only one group should be open at a time, but in fact two groups can be set as .isOpen()=true, even though only one displays. If I poll the status of three added groups, as in the stock example, with the controlEvent code below, I see that up to two groups are flagged as open, even though only one displays at a time. If yo
I was under the impression that the accordion would close open groups for me with each selection, like a radio button, which I wanted to use as a trigger to move controllers between groups. Is there another flag I can monitor that will only flag the group that is displayed? Does the accordion have an attribute of it's own I can key on?
Thanks,
Rick
u manually close
a group by clicking the bar, it closes, but if you click another group's bar, both remain open. When you click a third bar, it closes the first one that you opened, but not the second.I was under the impression that the accordion would close open groups for me with each selection, like a radio button, which I wanted to use as a trigger to move controllers between groups. Is there another flag I can monitor that will only flag the group that is displayed? Does the accordion have an attribute of it's own I can key on?
Thanks,
Rick
accordion.setCollapseMode(Accordion.SINGLE);
- void controlEvent(ControlEvent theEvent) {
if (theEvent.isGroup()) {
println("g1 open = "+g1.isOpen());
println("g2 open = "+g2.isOpen());
println("g3 open = "+g3.isOpen());
}
1