We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I have just found this library, but do not know how to implement linebreak() or font/color/size changes for Textlabel. When I try to change the font it doesn't work, and I don't know how to use linebreak and can't find any information - (Beginner) Cheers!
Answers
Here is an example. You can line break with \n. setColorValue() and setFont along with the size.
Check the documentation for the textlabel here, you have all the functions that you can implement. sojamo.de/libraries/controlP5/
Hi thanks so much, I did find this, but when I tried to change the textLabel (the text beside a checkbox for example) it would not change. For example in this segment, I cannot find a way to change the text after '.addItem'. I have tried to import font etc and it seems to work everywhere but here.
What do you need to change specifically? Font/color or the text itself?
The font - colour and size. Still going through all the libraries... I have found some old stuff from 2009 but it does't work any more -
They do work. setColorLabel(color(0)) gives you the color of the label, and you set it to 0 meaning black. color() can take 3 parameters inside color(red, green, blue) thus giving you the spectrum of colors. For the font type and size use cp5.setFont(createFont("dotum", 22)). You can also make groups of elements to get a different font for each one.
Ok thanks, will give it another go, I think maybe I am over thinking this though and just need to do some radio buttons, that may make it easier? Basically I need; - user input (buttons 0-2 x6 rows), and an addition calculation for each number input. Is there a specific kind of button that may work better for that? I initially began with the ControlP5 because it had 'checkboxes'.
I did figure out the font thing, but the smoothing doesn't work. I just ended up using text() instead.
Cheers;-)
How did you figure it out with the font?
Thanks for your help