how to enlarge columns
Hello everyone, I'd like to enlarge my column with script. How to do it ?
Thank you
ScriptingRe: how to enlarge columnsHere is the example taken from the Scripting Index for the Set Display Width message
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = :Height << Get Display Width;
:Height << Set Display Width( 2 * w );
Re: how to enlarge columnsWhen I paste the code, the width of the column it has not grown
Re: how to enlarge columnsIt turns out that "w" is coming back as zero, so the calculation in the Set Displa Width is zero. Try changing it to something like
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = :Height << Get Display Width;
:Height << Set Display Width( 4 * 90 );
Re: how to enlarge columnsHere's a variation you might find useful
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = ((Text Box( dt:name[1], <<SETBASEFONT></SETBASEFONT>
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.