Sidechair

box.set_text_wrap()

Browse the reference

Chooses whether text inside a box breaks into lines to fit the box's width or stays on one line.

Try it in the editor

text.wrap_auto breaks long text into lines that fit the box width, and text.wrap_none keeps one line even when it overflows.

Wrapping suits sentences in wide boxes; no wrapping suits short tags.

Syntax

Pine Script
box.set_text_wrap(id: series box, text_wrap: series string) -> void
box.set_text_wrap(text_wrap: series string) -> void

Arguments

NameTypeDefaultDescription
idseries boxrequiredThe box whose text wrapping changes.
text_wrapseries stringrequiredtext.wrap_auto breaks the text to fit the box width; text.wrap_none (default) keeps it on one line.

Returns

Nothing.

Remarks

  • On Sidechair: wrapping is not applied yet, so a call reports a warning and the text stays on one line.

Example

Pine ScriptWrap a long noteOpen in editor
//@version=6
indicator("box.set_text_wrap: wrapping", overlay = true)
var box z = box.new(bar_index, high, bar_index + 12, low, text = "Order block above prior high", bgcolor = color.new(color.gray, 85))
box.set_text_wrap(z, text.wrap_auto)

See also

Not on Sidechair yet