cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

ScriptBox scrolling

Hi, I would like to scroll the following script box to the end, so that the last string written is always visible. 

 

w=new window("a", sb=script box());

for (i=1, i<=100, i++,
		sb<<append text(char(i) || "\!N");
// I would like to set a scroll to end here, so that the last written string is visible.
);

By instpect the the display box tree, I see that a "scroll box" is automatically created around the script box, but I have not found a way to access it.  

 

Any suggestion?

 

thanks

Matteo

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: ScriptBox scrolling

For script box you can use Set Line to go to specific line

Names Default To Here(1);

w = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i <= maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

lines = sb << get lines;

sb << Set Line Text(N Items(lines), Char(lines[N Items(lines)]));

The scrollbox which wraps script box seems to be some sort of weird scrollbox (it is still scriptbox..)

Names Default To Here(1);

nw = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i < maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

scroll = nw[ScrollBox(1)];
Show(scroll << Class Name);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: ScriptBox scrolling

For script box you can use Set Line to go to specific line

Names Default To Here(1);

w = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i <= maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

lines = sb << get lines;

sb << Set Line Text(N Items(lines), Char(lines[N Items(lines)]));

The scrollbox which wraps script box seems to be some sort of weird scrollbox (it is still scriptbox..)

Names Default To Here(1);

nw = New Window("a", sb = Script Box());
maxcount = 100;

For(i = 1, i < maxcount, i++,
	sb << append text(Char(i) || "\!N");      // I would like to set a scroll to end here, so that the last written string is visible.
);

scroll = nw[ScrollBox(1)];
Show(scroll << Class Name);
-Jarmo

Re: ScriptBox scrolling

Thanks, it works!

 

Matteo

Recommended Articles