===========Example:
controller = new ControlP5(this);
controlWindow = controller.addControlWindow("Controls", 100, 100, 500, 500);
controlWindow.hideCoordinates();
Tab aTab = new Tab(controller, controlWindow, "ATab");
Knob aKnob = controller.addKnob("A Knob", 0, 1000, 300, 150, 150, 50);
//Knob will be there
aKnob.moveTo(aTab);
ListBox aListBox = controller.addListBox("a listbox", 50, 50, 200, 200);
aListBox.addItem("Item 1", 1);
aListBox.addItem("Item 2", 2);
//Won't work
aListBox.moveTo(aTab);
//Works
aListBox.moveTo(null, aTab, controlWindow);
===========
This is due to Knob.moveTo(theTab) is Controller.moveTo(theTab), which
determines the window by asking theTab.
ListBox.moveTo(theTab) is ControllerGroup.moveTo(theTab), which just nulls it.
I would recommend patching ControllerGroup class like so:
===ORIG
public void moveTo(Tab theTab) {
moveTo(null, theTab, null);
}
===ORIG
===PATCH
public void moveTo(Tab theTab) {
moveTo(null, theTab, theTab.getWindow());
}
===PATCH
Original issue reported on code.google.com by the.lo...@gmail.com on 14 May 2011 at 3:41
Original issue reported on code.google.com by
the.lo...@gmail.com
on 14 May 2011 at 3:41