PDA

View Full Version : Inserting special characters in text object


tokola
05-28-2015, 10:00 AM
This seems like a trivial thing to do, but could not find anything after searching on the forum and the documentation, quite extensively.

Is there a way to insert special characters (like TAB, RETURN, etc) in a text object? I've tried viz.KEY_RETURN but this return the ascii number of the character. It would be really useful to have multiple lines in a text object.

Thanks!

mape2k
06-02-2015, 07:38 AM
You can do that by inserting special commands in the text string you want to display.

E.g. \n for a new line: 'This is the first line\nThis line will be below the first line.'

There are a couple of those commands, e.g. \t for a tab.