Choose Language Hide Translation Bar
Highlighted
kuannygoh
Level I

How to collapse a outline box in a tab page

Hi all , i am very new to jsl programming , want to ask  ,how can i collapse a outline box in a tab page  ?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


win = New Window( "Tab Box",
	tb = Tab Box(
		Tab Page Box( // tab contents
			Title( "First Step" ),
			 OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex ))),
			 OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
		),
		Tab Page Box( // tab contents
			Title( "Second Step" ),
			 OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			 OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
			
		)
	)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How to collapse a outline box in a tab page

You can either set pointers to the Outline Box()s and close them individually, or use XPath() and find all of them and operate on all Outline Box()s together....see below

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


win = New Window( "Tab Box",
	tb = Tab Box(
		Tab Page Box( // tab contents
			Title( "First Step" ),
			 ob1=OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex ))),
			 ob2=OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  ob3=OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
		),
		Tab Page Box( // tab contents
			Title( "Second Step" ),
			 ob4=OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			 ob5=OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  ob6=OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
			
		)
	)
);
ob1<<close;
ob2<<close;
ob3<<close;
ob4<<close;
ob5<<close;
ob6<<close;

// or
//(win << xpath( "//OutlineBox" )) << close;
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: How to collapse a outline box in a tab page

You can either set pointers to the Outline Box()s and close them individually, or use XPath() and find all of them and operate on all Outline Box()s together....see below

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


win = New Window( "Tab Box",
	tb = Tab Box(
		Tab Page Box( // tab contents
			Title( "First Step" ),
			 ob1=OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex ))),
			 ob2=OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  ob3=OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
		),
		Tab Page Box( // tab contents
			Title( "Second Step" ),
			 ob4=OutlineBox( "Summary", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			 ob5=OutlineBox( "Pareto plot", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			  ob6=OutlineBox( "Control chart", dt <<Distribution( Column( :Height, :Weight ), By( :sex )) ),
			
			
		)
	)
);
ob1<<close;
ob2<<close;
ob3<<close;
ob4<<close;
ob5<<close;
ob6<<close;

// or
//(win << xpath( "//OutlineBox" )) << close;
Jim

View solution in original post

Highlighted

Re: How to collapse a outline box in a tab page

You can also use the in-line message:

 

Outline Box( "Summary",
	dt << Distribution( Column( :Height, :Weight ), By( :sex ) ),
	<<Close( 1 )
)
Learn it once, use it forever!
Article Labels

    There are no labels assigned to this post.