We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I made a program with lots of controls with controlP5, related to a winch system. The controls for one system are organized in three tabs (setup, path, play) . Now I want to add a second winch system, and have one group of 3 tabs on the left on the screen, and another group of three tabs on the right of the screen.
Like so:
[setup1 | path1 | play1] [setup2 | path2 | play2]
and still can see path1 and setup2, for example, at once.
How do I do that ? controlP5 is so rich I can't get my head around the groups, controllerGroups, and so on...
Thanks, Charlot
Answers
How 'bout?
Hi, thanks, but no :).
In your code, if I click a tab on the right, it hides the tab that was shown on the left.
The idea is to have two independent groups of tabs, it's not just a matter of layout.
(I just found my example has a mistake, I'll edit it if I can)
As far as I know groups of tabs are not supported directly. There is the possibility to add certain controllers to the global tab to make them always visible. You could use controlEvents to show/hide controllers manually (but then you would be basically recreating the tab functionality) or create another custom solution within a single ControlP5 instance. I suppose the easiest method (read: requiring the least custom code) is to just use two ControlP5 instances, one for each independent group of tabs (see code example below). Additional features with regard to tabs (groups of tabs, adding controllers to multiple tabs, tabs and subtabs) would be very useful though, so perhaps you can also file an issue/enhancement request for this: http://code.google.com/p/controlp5/issues/list
Adapted Code:
Thank you, that's helpful. I did not want to use two separate ControlP5 objects, but if that's the only way, so be it.
Thanks again, Charlot