Hello.
I am trying to change widh and height of Textlabel in ControlP5.
But I am not being able to change it. Please Help.
Here is the code from ControlP5 library example. I changed it a little bit.
import controlP5.*;
ControlP5 cp5;
void setup() {
size(700,400);
cp5 = new ControlP5(this);
Textlabel AA = cp5.addTextlabel("label")
.setText("A single ControlP5 textlabel")
.setPosition(100,50)
.setFont(createFont("Georgia",20))
.setWidth(100) //not working
.setHeight(40) //not working
;
println("width = " + AA.getWidth());
println("height = " + AA.getHeight());
}
void draw() {
background(0);
}
The result is:
width = 200
height = 20
These value of width and height of textlabel doesn’t change no matter what I set using setWidth() and setHeight() functions.
Note: I know changing these seems to be irrelevent. But I need to modify and use these parameters (width and height of textlabel) in my program.
Please Help.