@KevinWorkman
i saw that. that doesn't answer my question. the link you provided appends the inputed text to the output.
what i need is a simple multiline text input, just like the window you inputed your answer in this thread.
controlp5 offers only a single line neverending text area by default.
I am not a CP5 expert, but I don't believe there is currently a textarea input -- you would have to implement one.
One workaround approach might be (? untested) to use a hidden Textfield and live display the result string inside a paired Textarea -- or accumulate line inputs. However, these hacked approaches wouldn't give you clickable random access to wrapped text for editing -- you would only be able to click in the box area and then type without a cursor. https://forum.processing.org/two/discussion/18469/cp5-textarea-multiline
Instead you would probably (?) need to extend Textfield to make it fully multiline. My guess is that the reason this hasn't been done in CP5 already is because it is hard.
Possibly relevant if you decided to build your own clickable multiline text output area from the ground up: bricklaying text layout algorithm discussion:
But honestly, creating complicated GUIs isn't where Processing's strength lies. If I needed a text area, then I'd probably use P5.js along with an HTML textarea.
Answers
This is the first result I got for googling "ControlP5 text multiple lines": https://forum.processing.org/two/discussion/18469/cp5-textarea-multiline
@KevinWorkman i saw that. that doesn't answer my question. the link you provided appends the inputed text to the output. what i need is a simple multiline text input, just like the window you inputed your answer in this thread. controlp5 offers only a single line neverending text area by default.
Have you looked in the documentation? It sounds like you're just looking for the
Textarea
class?@KevinWorkman Textarea is an output class, not input.
I am not a CP5 expert, but I don't believe there is currently a textarea input -- you would have to implement one.
One workaround approach might be (? untested) to use a hidden Textfield and live display the result string inside a paired Textarea -- or accumulate line inputs. However, these hacked approaches wouldn't give you clickable random access to wrapped text for editing -- you would only be able to click in the box area and then type without a cursor. https://forum.processing.org/two/discussion/18469/cp5-textarea-multiline
Instead you would probably (?) need to extend Textfield to make it fully multiline. My guess is that the reason this hasn't been done in CP5 already is because it is hard.
Possibly relevant if you decided to build your own clickable multiline text output area from the ground up: bricklaying text layout algorithm discussion:
In your case you might be tracking this for each character rather than each word in order to interpret clicks into cursor insert positions.
You could also just use another GUI library. Looks like G4P has a textarea: http://www.lagers.org.uk/g4p/ex-textarea/index.html
But honestly, creating complicated GUIs isn't where Processing's strength lies. If I needed a text area, then I'd probably use P5.js along with an HTML textarea.