Another way of handling this, is to completely hide the outline box of interest, rather than closing it; The button box can then redisplay the outline box, rather than opening it. This is all done using the Visibility element available to the Outline Box() object.
![txnelson_0-1663057966494.png txnelson_0-1663057966494.png](https://community.jmp.com/t5/image/serverpage/image-id/45411i2CB9224463D14E3F/image-size/medium?v=v2&px=400)
Names Default To Here( 1 );
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "/C:/Program Files/SAS/JMPEA/17/Samples/Data/Big Class.jmp" );
ow = Oneway(
Y( :height ),
X( :age ),
Means( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 )
);
nw = New Window( "My Display",
<<journal,
bb = Button Box( "Display Anova",
nw["Oneway Anova"] << visibility( switch );
If( switch == "visible",
switch = "collapse";
bb << set button name( "Hide Anova" );
,
switch = "visible";
bb << set button name( "Display Anova" );
)
;
)
);
Report( ow ) << journal;
ow << close window;
switch = "visible";
nw["Oneway Anova"] << visibility( "collapse" );
Jim