Is there any way to control (expand) the Caption() box text wrap?
I'm guessing not from the Scripting Guide. It would be a nice feature if ever possible. It's kind of annoying to have a line wrap where you don't want it to wrap, and if set wrap() could ever be employed, then one could choose the line break where they wanted using a normal line break escape.
thanks, DJ
You can use the Carriage Return Line Feed escape sequence to wrap to the next line
Names Default To Here( 1 );
Caption(
{100, 200},
"explan\!nation",
Font( "Arial Black" ),
Font Size( 16 ),
Text Color( "blue" ),
Back Color( "yellow" ),
Spoken( 1 )
);
Hi DJ! I'm not sure, but is this what you are looking for? It uses one of the escape sequences for quoted strings. (See the section JSL Building Blocks > JSL Syntax Rules in the Scripting Guide.) --Marie
Names Default To Here( 1 );
Caption(
{100, 200},
"This is a \!Nvery \!Nvery \!Nlong sentence.",
Font( "Arial Black" ),
Font Size( 16 ),
Spoken(0)
);
I don't think that's what @djhanson is looking for. They want to control where the wrap occurs, rather than force the wrap with embedded CR/LFs.
For example:
caption("The quick brown fox jumped over the lazy dog. Hello world hello world");
produces this:
You could use a text box to control the wrap. Not quite the same as caption() though.
nw = new window("Caption",
tb = textbox("The quick brown fox jumped over the lazy dog. Hello world hello world")
);
tb << set wrap(500);
wait(4);
nw << close window();