Chooses whether text inside a box breaks into lines to fit the box's width or stays on one line.
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
box.set_text_wrap(id: series box, text_wrap: series string) -> void
box.set_text_wrap(text_wrap: series string) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box whose text wrapping changes. |
| text_wrap | series string | required | text.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
//@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