BookmarkSubscribe
Choose Language Hide Translation Bar
drew_baumgartel
Community Trekker

Markup and Set Wrap in the same text box

I'm running JMPPro 14.3. I've tried the same thing in JMP12, and in JMP11 (I think) as well. Can someone please show me how to simultaneously use markup (bold, underline, etc.) and set wrap in the same text box? Try running the script below and I think you will understand what I am talking about.

 

nw = New Window("Example of markup in text box",
Text Box("<b>This is in bold but wraps awkwardly</b>", << Markup),
Text Box(""), // to prevent above text box from piling on below text box
Text Box("This is not in bold but wraps correctly", << Set Wrap(300)),
Text Box("<b>This seems like it should be in bold and wrap correctly but isn't</b>", << Set Wrap(300) << Markup),
Text Box("<b>Also should be in bold and wrap correctly but isn't</b>", << Markup << Set Wrap(300)),
tb1 = Text Box("<b>Breaking it out into multiple commands doesn't work either</b>", << Markup),
tb1 << Set Wrap(300),
tb2 = Text Box("<b>Reversing order doesn't work</b>", << Set Wrap(300)),
tb2 << Markup
);

0 Kudos
4 REPLIES 4
txnelson
Super User

Re: Markup and Set Wrap in the same text box

<< Markup and <<Set Wrap() are not really messages, like you pass to JSL objects.  They are actually just element/parameters for the text box.  Therefore, there needs to be commas to separate them.  See my example below:

nw = New Window("Example of markup in text box",
Text Box("<b>This is in bold but wraps awkwardly</b>", << Markup),
Text Box(""), // to prevent above text box from piling on below text box
Text Box("This is not in bold but wraps correctly", << Set Wrap(300)),
Text Box("<b>This seems like it should be in bold and wrap correctly but isn't</b>", << Set Wrap(300), << Markup),
Text Box("<b>Also should be in bold and wrap correctly but isn't</b>", << Markup ,<< Set Wrap(200)),
tb1 = Text Box("<b>Breaking it out into multiple commands doesn't work either</b>", << Markup),
tb1 << Set Wrap(300),
tb2 = Text Box("<b>Reversing order doesn't work</b>", << Set Wrap(300)),
tb2 << Markup
);
Jim
0 Kudos
drew_baumgartel
Community Trekker

Re: Markup and Set Wrap in the same text box

Hmm. This doesn't seem to work for me. The below script

nw = New Window("Example of markup in text box",
	Text Box("<b>This is in bold but wraps awkwardly</b>", << Markup, << Set Wrap(1200)),
	Text Box("", << Set Wrap(1200)),
	Text Box("<b>This is not in bold but wraps correctly</b>", << Set Wrap(1200))
);

 Gives me the following

image.png

Additionally, not calling it a message is misleading (this part is a complaint, not a problem). Internally, JMP refers to it as a message. For example, if I type some garbage like "<< Set Milk" to a text box, I get the following in the log:

 

The display box 'TextBox' does not recognize the message 'Set Milk'; perhaps you mean one of these: <<Save HTML <<Get XML <<Set Tip <<Set Wrap… <<Set Text <<Get Tip <<SetNLines <<Set Width, etc.

0 Kudos
txnelson
Super User

Re: Markup and Set Wrap in the same text box

I get the same result running under JMP 14.3, however, it appears to be fixed in JMP 15

Jim
drew_baumgartel
Community Trekker

Re: Markup and Set Wrap in the same text box

@txnelson > thank you *very* much for your help and prompt responses! I really appreciate it. I'm glad a fix is in for 15.

0 Kudos