We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there,
I'm Ignazio and I'm having great fun using Processing in conjunction with ControlP5. I have a small question, that got me stuck for a little while: I have the name of a textlabel stored in a string and I want to change an attribute of that label. I did something very similar with a button:
cp5.getController(buttonName).unlock();
In the example above I was unlocking the button which had the name stored in the string buttonName.
Any help?
Thank you very much, Ignazio
Answers
I took this example code from: http://www.sojamo.de/libraries/controlP5/examples/controllers/ControlP5button/ControlP5button.pde
Instructions:
Press the space bar to lock or unlock the wicked button.
Kf
Hey kfrajer,
thank you for the answer, I appreciated it. So I can use the getController method also in the textlabel class?
I'll check it out soon, Ignazio
The object textLabel can be accessed using getController but not sure if it can be accessed in the same way as button. A button can be accessed when an event is emitted. On the other hand, I am not sure if textLabel emits an event at all.
http://www.sojamo.de/libraries/controlP5/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde
Consider the code below.
Kf