[ControlP5] How to change the capitalization from Button?

edited September 2014 in Library Questions

Hello, i want th change the capitlization from Button:
from HELLO to Hello

   import controlP5.*;
   ControlP5   cp5 = new ControlP5(this);

   cp5.addButton("Hello")
     .getCaptionLabel().setControlFont(new ControlFont(createFont("Arial", 12)));
   ;

Answers

  • import controlP5.*;
    ControlP5   cp5 = new ControlP5(this);
    
    cp5.addButton("Hello")
      .getCaptionLabel().toUpperCase(false).setControlFont(new ControlFont(createFont("Arial", 12)));
    ;
    

    I see you're asking a lot of these kinds of questions. Have you looked at the Javadoc of ControlP5? http://www.sojamo.de/libraries/controlP5/reference/ Here you can see all the methods you can apply. Lots of answers are hidden there.

  • edited September 2014

    thx, sometimes i find nothing. this link will help in futher (i hope) ;)

Sign In or Register to comment.