We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hellou,
sometimes the label is too long :/
is it possible to hide the captionLabels from the Items in the Background?
import controlP5.*;
ControlP5 cp5;
DropdownList l;
PFont myFont;
void setup() {
size(1000, 500);
cp5 = new ControlP5(this);
l = cp5.addDropdownList("myList")
.setPosition(100, 100)
;
String[] fontList = PFont.list();
for (int i=0; i<fontList.length; i++) {
l.addItem(fontList[i], i);
}
myFont = createFont("Arial", 20);
}
void draw() {
background(90);
}
Answers
my wish:
(photoshop :P)
Just shorten it before you add it to the list. For example methods that might be useful for such a task are String.substring(start, end), String.length(), perhaps even textWidth(String).
understand. but its a little detour.
is there any place where i can suggest improvements like these? Anyway do the founder/developer support the cp5 yet today?
(srry for my bad english)
Well, it's only 1 or 2 lines of code...
It seems ControlP5 was just moved to GitHub, nice!
See: https://github.com/sojamo/controlp5
Issues: https://github.com/sojamo/controlp5/issues
thx for this link ;)
To the thread:
Now, another problem appears, when it is cutted:
BOOKMAN OLD STYLE FET
BOOKMAN OLD STYLE FET
I can not see if it is:
BOOKMAN OLD STYLE FETT
or it is
BOOKMAN OLD STYLE FETT KURSIV
:O
Well, what did you expect? That is obviously the consequence of cutting the end of the name (as you showed you wanted). Options to solve this: