Multi Line Strings

Rory's Avatar


05 Apr, 2015 11:45 AM

Sometimes I need to label my visuals with strings from cvs files. This can be frustrating when the strings are long, and need to be broken over multiple lines.

Previously I would just write out the string to include line breaks, but that was inefficient really. So I have written a recursive function that takes a user string and an integer length and returns a string with line breaks.

It seems to work nicely. If anyone has any comments/better ideas for implementing this please comment.

Thanks :-)


  1. Support Staff 1 Posted by john on 06 Apr, 2015 04:55 AM

    john's Avatar


    How is this different from simply setting the width parameter in the text path node? (See attached screenshot.)

    I'm probably missing something. If so, could you attach your nodebox file so I could play with it myself?

  2. 2 Posted by Rory on 06 Apr, 2015 04:58 AM

    Rory's Avatar

    Wow, I'm so dim sometimes. My first thought is always just to try and reinvent the wheel, when the NodeBox team have done a pretty good job of inventing it for us....

    feeling bashful

  3. Support Staff 3 Posted by john on 06 Apr, 2015 05:04 AM

    john's Avatar

    No prob. The same thing happens to me all the time. There is a lot of subtlety to NodeBox and little documentation to help us grasp it. These forum discussions are the best way we have to bring all those hidden features to light.

  4. 4 Posted by c4632797 on 23 Jun, 2016 01:38 AM

    c4632797's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • mult_lines.png 24.1 KB
  • Screen_Shot_2015-04-05_at_17.44.26.png 88.4 KB
  • 868 Bytes

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

15 Jul, 2024 07:37 PM
11 Jul, 2024 03:48 PM
28 Jun, 2024 01:51 PM
27 Jun, 2024 02:56 PM
27 Jun, 2024 01:57 PM


26 Jun, 2024 08:17 PM
26 Jun, 2024 11:35 AM
24 Jun, 2024 02:42 AM
24 Jun, 2024 12:46 AM
23 Jun, 2024 08:07 AM
08 Jun, 2024 09:05 AM