In the following code, adding controls to the ControlWindow is not a problem, but for some reason using the same code that adds the slider and button fails with a textArea control. I want to display a label in the control window that can act as a status display, showing status text as the app runs.
This is the code:
- // Control window code ***********************
- cp5 = new ControlP5(this);
- // create a new ControlWindow
- ControlWindow cw = cp5.addControlWindow("controlP5window",10,10,200,400,30);
- cw.setTitle("Controls");
- int i=0;
- Slider s = cp5.addSlider("backcolor",0,255,20,40 +i*15,100,10);
- s.setWindow(cw);
- Button b = cp5.addButton("loadFile",20,20,100,80,19);
- b.setWindow(cw);
- Toggle t = cp5.addToggle("HUD",false,20,140,80,20);
- t.setWindow(cw);
- Textarea q = cp5.addTextarea("label1","Displaying file:\n"+ loadPath, 0,200,200,60);
- q.setWindow(cw);
- q.setColorForeground(0xffff0000);
- // End Control Window Code ************************
Line 19 gives the following error: "function setwindow(controlwindow) does not exist" whereas lines 14 and 16 are fine.
Any suggestions? Is this an issue particular to the textArea control?
1