Multi Line Strings
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 :-)
Rory
-
mult_lines.png 24.1 KB
-
Screen_Shot_2015-04-05_at_17.44.26.png 88.4 KB
- user_funcs.py 868 Bytes
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by john on 06 Apr, 2015 04:55 AM
Rory,
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 Posted by Rory on 06 Apr, 2015 04:58 AM
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
Support Staff 3 Posted by john on 06 Apr, 2015 05:04 AM
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 Posted by c4632797 on 23 Jun, 2016 01:38 AM
Good one
()[http://dhl-tracking.org/]