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 disable input
Page Index Toggle Pages: 1
controlP5 disable input (Read 599 times)
controlP5 disable input
Mar 20th, 2009, 9:41am
 
Hi there, I'm using this library and have some textfields that i'm using to display text only. i.e. I dont want to use them for input as they are part of a debugging console and just displaying text.

Can you tell me how I can disable the input on them?

Thanks!
Re: controlP5 disable input
Reply #1 - Mar 20th, 2009, 11:23am
 
hi, maybe textarea is more suitable for what you are doing? use
Code:
yourTextarea.setText("your console text here"); 


to save performance, try to only update the textarea when there are changes in the text to be set for the textarea.
if textare does not work for you, but you need to use textfield, then there is no particular function to disable key input - you might try to find a way around with
Code:
textfield.setFocus(false); 


hope this helps.
best,
andreas
Re: controlP5 disable input
Reply #2 - Mar 22nd, 2009, 9:25am
 
Hi, I tried a textarea, but I couldn't use:
myTextArea.moveTo("debug");
It just throws an exception! So I've stuck with a textfield and am living with it being editable. I'm only updating on status change and the debug console runs on a seperate thread with a delay(100) in its run method, so it seems to be reasonably efficient.

Any ideas on this tab problem? Also, the setActive method seems very twitchy for tabs. I've got three tabs and when I set one to active, everythings fine. If I set another one to active, controlP5 seems to go into weird mode where all the input controls can be moved  and none are responsive to input anymore. I wonder if this is an id conflict perhaps? I've used the same id's on my tabs as on some of the controls.

Do I need a totally seperate id for each controller or can I use different ids grouped as a set on each tab. I'd prefer the later so I can make edits without having to worry about conflicts with other tabs.
Page Index Toggle Pages: 1