Enabling closure of multiple outline boxesHello, I'd like to reproduce in one script of mine the behavior of most JMP platforms, where the user can close multiple outline boxes by keeping the control key down.
For example, in the following, I'd like the user to be able to close "1" and "2" together when pressing "ctrl".
new window("ex", Outline Box("Main", outline box("1",vlist box()), outline box("2",vlistbox())));
I cannot find a suggestion in the scripting index for this.
thanks
Matteo
thanks
Matteo
Re: Enabling closure of multiple outline boxesJim's reply makes me realise that I've probably been a little hasty (though that might depend on exactly the behaviour you want). So, just to be clear (on a Mac) holding the CTRL key and left clicking on the disclosure icon of the 'Main' outline node created by the code in the original question produces this context menu:

which already has an option to do what my 'setMenuScript()' does. This context menu also appears with a right click (with no CTRL key)
Re: Enabling closure of multiple outline boxesApparently there is a partial implementation of what you want. The script below allows the Outline Boxes to honor the CNTL feature
names default to here( 1 );
New Window( "test",
V List Box(
Outline Box( "testit", Table Box( String Col Box( "test one", {"a", "b"} ) ) ),
Outline Box( "testit", Table Box( String Col Box( "test two", {"c", "d"} ) ) )
)
);Re: Enabling closure of multiple outline boxesThanks Ian,
as you wrote, this is not exactly what I was looking for, but your idea could be a workaround, I will try it!
Still, I'm a bit surprised that broadcasting a command to similar display boxes within a display tree is not feasibile with a built-in function. I hope this can be implemented in JMP 14!
thanks
Matteo
Re: Enabling closure of multiple outline boxesNot quite what you asked for, but, FYI, you can do this kind of thing:
Names Default To Here( 1 );
nw = New Window( "ex",
obMain = Outline Box( "Main",
Outline Box( "1", V List Box() ),
Outline Box( "2", V List Box() )
)
);
obMain << setMenuScript(
{
"Close All",
obs = nw << xpath( "//OutlineBox");
for(i=1, i<=NItems(obs), i++, obs[i] << close(1)),
"Open All",
obs = nw << xpath( "//OutlineBox");
for(i=1, i<=NItems(obs), i++, obs[i] << close(0));
}
);
Looking at 'Is Control Key' in 'Help > Scripting Index' it looks like the modifier keys are intended for graphics boxes.