Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
filococus
filococus's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
ControlP5 adjust tab's width after changing the font (version 0.5.7)
[0 Replies]
25-Feb-2012 06:48 PM
Forum:
Contributed Library Questions
Hi everyone!
I'm trying to "resize" the tab's width after setting the font size. I've tried something like this:
import controlP5.*;
ControlP5 control;
Tab resume;
Tab scenario;
void setup() {
size (800, 200);
control = new ControlP5(this);
resume = control.getTab("default");
resume.activateEvent(true);
resume.setColorActive(color(150, 150, 150));
resume.captionLabel().setControlFont(createFont("impact", 20, true));
resume.captionLabel().style().marginTop = 3;
resume.setHeight(30);
resume.setLabel("Resume12345");
scenario = control.addTab("Scenario");
scenario.activateEvent(true);
scenario.setColorActive(color(150, 150, 150));
scenario.captionLabel().setControlFont(createFont("impact", 20, true));
scenario.captionLabel().style().marginTop = 3;
scenario.setHeight(30);
scenario.setLabel("Scenario12345");
}
void draw() {
}
The problem is after changing font and the font size for the tab, the tab's width does not change according to label length and font size.
Any ideas?
Thanks in advance,
Diana
«Prev
Next »
Moderate user : filococus
Forum