Perspective button text new line

I’m trying to tell Ignition to go to a new line in a Button text but it seems that both the HTML
tag and \n\n don’t work as you can see from my attempts
Perspective button new line 1 Perspective button new line 2
Does anyone know how to do it?

oke so

add in the style:

white-space: pre-wrap

and then you will have to fiddle with the text input a bit untill you get this (add in a long string and lose focus):

then you can add in enters as you wish:

1 Like

Thanks, initially it didn’t worked because the button text is binded to an expression so I just can’t type directly in the property. But by appliyng the pre-wrap style and incresing a bit the font size it worked out.

you can do it in a script too if you use triple “”"
idk if that works in expressions tho
""" test test test """

It doesn’t seem to work, this is an example of the expression I’m using
if(tag("[default]tagDirectory/tag")=1,'"""line 1 line2"""','"""line1 line2"""')

yeah i thought so
so you can add just the tag in the exprions (or just a direct tag link)
and then use the value in a script transform with the if logic

(seems like you have to remove the tabs tho else it indents)

1 Like

Easier option is to use expressions, where the literal \n won’t be escaped, e.g.:
(You’ll still want the white-space setting applied, though)


setting style white-space to pre-wrap worked for me …thanks

1 Like

yeah it works but only if style attribute whitespace is set to pre-wrap :+1: :+1: