We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › ControlP5 - Slider text size and color.
Page Index Toggle Pages: 1
ControlP5 - Slider text size and color. (Read 2259 times)
ControlP5 - Slider text size and color.
Feb 23rd, 2009, 9:51pm
 
Hello,
I cant read the lables on my sliders.
I need to change the text size and color on my sliders lables.
Anybody know how to do this?

ALSO,

is there any documentation on the ControllerStyle Class?

Thanks,
Andrew
Re: ControlP5 - Slider text size and color.
Reply #1 - Feb 27th, 2009, 11:53am
 
there is a slightly bigger pixel font available now, ControlP5.grixel. use since version 0.3.14
Code:

Controller mySlider = controlP5.addSlider("sliderValue",0,255,40,40,100,10);
mySlider.valueLabel().setFont(ControlP5.grixel).adjust();
mySlider.captionLabel().setFont(ControlP5.grixel).adjust();
mySlider.valueLabel().style().margin(-20,0,0,0);


ControllerStyle does not have any documentation yet, correct. currently it does apply to labels as follows:
// change margin for all 4 sides, same value
label.style().margin(int)
// change margin for all 4 side, individual values
label.style().margin(int,int,int,int)

Re: ControlP5 - Slider text size and color.
Reply #2 - Mar 24th, 2009, 8:10pm
 
Im Still having a problem with this. Probably doing it wrong.
Any help would be appreciated.

Error message is as follows:
"ControlP5.grixel cannot be resolved or is not a field"

my code is as follows:
  controlP5 = new ControlP5(this);
  Slider s = controlP5.addSlider("thighX",-135,40, -90,  260,430,   200,18);
   s.captionLabel().style().margin(0,0,10,0);
   s.captionLabel().setFont(controlP5.grixel).adjust();           <--  Error here



Thanks,  Andrew

PS. Thanks for writing this Lib. Great Job!
Re: ControlP5 - Slider text size and color.
Reply #3 - Mar 24th, 2009, 9:23pm
 
Oh yea!
I've also tried to create a new(larger) font, but am unsure as to how i might access it from the setFont() attrib.

Thanks,
A.
Re: ControlP5 - Slider text size and color.
Reply #4 - Apr 8th, 2009, 7:19am
 
I'm also trying to increase the size of the font in ControlP5.  I tried the ".valueLabel().setFont(ControlP5.grixel).adjust();" on a textarea and it printed the first line but the rest was missing, and did not appear to wrap.
Page Index Toggle Pages: 1