ControlP5 Tabs & Groups
in
Contributed Library Questions
•
1 year ago
I'm attempting to create a layout that has "tabs within tabs" -- that is, a row of top-level tabs (which is easy to set up) and a set of sub-tabs within a given tab. It appears that tabs are always top-level objects, so I'm trying to use Groups to implement the sub-tabs.
In order for this to work, I need each Group, when activated, to de-activate the other groups. In other words, the controls for only one Group should be displayed at any given time. And in order to do this, I think I probably need to create a ControlListener for each Group and add it to the Group using addListener.
Or at least, that's my current theory. But it doesn't seem to be working. Even after I have added a listener to the Group and put a println statement in the controlEvent method for the listener, no print statement appears. I'm not sure whether clicking on a group header doesn't generate an event at all, or whether it generates an event but I'm not using the right technique to grab the event when it occurs.
I hope all of this is clear. (I'm kinda new to Processing.) Can anyone suggest either a way to grab the event, or, more generally, a nice way to implement tabs within tabs? Thanks!
1