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 - set background for textarea, textlabel
Page Index Toggle Pages: 1
controlp5 - set background for textarea, textlabel (Read 624 times)
controlp5 - set background for textarea, textlabel
Oct 20th, 2008, 12:46pm
 
hi,

does anybody know if it is possible to set the background color for textarea, textfield and textlabel in controlp5?

i uploaded a screenshot on my page which illustrates what i mean:
http://www.looksgood.de/_tmp/controllP5_text_background.png

thanks benedikt

Re: controlp5 - set background for textarea, textl
Reply #1 - Oct 21st, 2008, 5:41am
 
hi benedikt,
i guess i have to disappoint you here, currently it is not possible to set the background of a textarea or textlabel. i will find a solution in future releases. for now you probably would need to draw the background rects by hand in your draw() method before controlP5 draws its controllers. not the best workaround but maybe it helps.
best,
andreas

Re: controlp5 - set background for textarea, textl
Reply #2 - Dec 3rd, 2008, 11:22pm
 
I tried it with Textfield like this and it worked. Not sure if this will help.

import controlP5.*;

ControlP5 controlP5;


String textValue = "";

Textfield myTextfield;

void setup() {
 size(400,400);
 frameRate(25);
 controlP5 = new ControlP5(this);
 myTextfield = controlP5.addTextfield("",100,160,200,20);
 myTextfield.setFocus(true);
myTextfield.setColorBackground(0);

}

void draw() {

}
Page Index Toggle Pages: 1