- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 )) ), ) ) );
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to collapse a outline box in a tab page
Just found and used this solution this morning with a journal created in a script - still works great!
Wanted to add that (at least in the journal context) using the XPath approach above also closes all children outline boxes - i.e., it acts like "Close All Below" instead of just "Close".
I had to add the line below to subsequently "silently" open associated children outline boxes, so that the parent outline boxes are all initially collapsed, but the children outline boxes are immediately visible when you toggle individual parent outline boxes.
(win << XPath( "//OutlineBox//OutlineBox" )) << Open All Below;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 )
)