Hi everyone,
I have trouble aligning text in a scrollable list in the ControlP5 library.
Here is an example :
import controlP5.*;
import java.util.*;
ControlP5 cp5;
void setup() {
size(400, 400);
cp5 = new ControlP5(this);
List l = Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h");
cp5.addScrollableList("dropdown")
.setPosition(100, 100)
.setSize(200, 100)
.setBarHeight(20)
.setItemHeight(20)
.addItems(l);
cp5.getController("dropdown").getCaptionLabel().setColor(color(255,0,0));
cp5.getController("dropdown").getCaptionLabel().alignX(ControlP5.RIGHT);
}
void draw() {
background(240);
}
If you run it, you can see that the color of the text is red (so “setColor” works) but the alignement stays left…
Am I doing something wrong or is it just not supported by the library ?
Thanks in advance for your time,
Have a nice day =)