Oneshot Button Confirmation Box Style

Is there any way to change the style of the confirmation box popup? Specifically, I want to have line breaks in the text, and the only way I've found to do that in perspective is with the "white space" property in the style options. But it doesn't seem like the confirmation box has a style for me to modify. Is there a different way to insert line breaks or newline characters into perspective text?

I also see different posts about using HTML and <br>, but that doesn't seem to work with the confirmation box, unless I'm doing it wrong.

In Perspective the "Markdown" component is the label-like component that best supports HTML/line break

Which confirmation box popup are you referring to?

Edit: The built-in confirmation on the Button is probably what you are referring to, if the HTML flag isn't working there it probably only accepts a simple string.

Where's that, Kyle? I don't see it in 8.1.41 or in the docs.

On the One Shot Button component, there's a property called confirm. If you enable it, a small dialog box will pop up when you click the button, and you have to press ok on that popup to set the button's value.

If the text is small enough, it's just a small box that pops up at the button. But it seems like if you have enough text, it will stretch across the entire screen and gray out the background, almost like a full screen popup rather than a tooltip-like popup. The thing I'm working with is I have 1 line of text that spans the entire window, and then a single word on the second line. I'd like to format this with newline characters so it looks more like a block.

1 Like

Hmmph! I never used that component before. Thanks.

Try adding this to Perspective | Styles | sytlesheet.css:

.ia_oneShotButtonComponent__confirmModal__message {
	whiteSpace: pre;
}

Depending on how you're generating the text you may need to insert \n for each newline.

1 Like

Maybe all of my CSS answers going forward need to have a massive Advanced Stylesheet asterisk... :grinning_face_with_smiling_eyes:

User Manual - Enabling the Advanced Stylesheet: