BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
kuannygoh
Occasional Contributor

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 )) ),
			
			
		)
	)
);

 

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
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
2 REPLIES 2
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

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!