Here's a variation you might find useful
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = ((Text Box( dt:name[1], <<setbasefont( "datatable" ) ) << getpicture) << getsize)[1];
dt:name << Set Display Width( 1.2 * w );
Read the w= line from the inside -> out like this:
- make a textbox with Katie and the data table font
- get a picture of the textbox
- get the size of the picture
- get the x dimension of the size
- use that for w, the width needed
I chose Katie in line 1 to make this picture. I added 20% to avoid "Ka...".
At some font sizes, 10% might not be enough.
Also, you can make a data table, change almost anything, and use the red triangle->copyTableScript(NoData) option to see how JMP scripts the changes. Paste the copy into an editor to see it.
Craige