Thanks for the tip, yes, I can now get and set the sizes of the label.
The problem is that JSL doesn't line by line, instead, it kinda computes the final state for different properties separately... And then applies.
Like:
...
...
ta1<<Fixed Size(0);
ta2<<Fixed Size(0);
...
...
{ta1, ta2} << Fixed Size(1);
//Final state should be Fixed Size(1) so we just apply that
So then the width remains the one that I initially set up:
ta1 << Text( "We need to discuss this at the next meeting." );
ta1 << Text Box( {70, 80, 350, 80+taHeight} );
ta2 << Text( "We need to discuss this at the next " );
ta2 << Text Box( {70, 120, 350, 120+taHeight} );
Adding Wait(0.5) helped to overcome that.
So the final script is:
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv << report;
taHeight = 40;
ta1 = rbiv << Add Text Annotation();
ta2 = rbiv << Add Text Annotation();
ta1 << Text( "We need to discuss this at the next meeting." );
ta1 << Text Box( {70, 80, 350, 80+taHeight} );
ta2 << Text( "We need to discuss this at the next " );
ta2 << Text Box( {70, 120, 350, 120+taHeight} );
{ta1, ta2} << Background Color( "Light Yellow" ) << Text Color( "red" )<<Fixed Size(0);
Wait(0.05);
ta1_y = ta1 << Get Height();
ta2_y = ta2 << Get Height();
Show(ta1_x, ta2_x);
{ta1, ta2} << Fixed Size(1);
ta1 << Set Height(ta1_y*0.92);
ta2 << Set Height(ta2_y*0.92);