Subscribe Bookmark RSS Feed

Detecting the opening of an outline box

I have a JSL script which creates a number of outline boxes, any of which can be opened or closed. I want the action of opening any one of them to close the others. Is there any way I can do that?

The following little script, where outline box A is initially open but B and C are initially closed, illustrates what I'm trying to do.

nw = New Window("My Window",
A = Outline Box("Panel Box A", HListBox(Button Box("A1"), Button Box("A2"), Button Box("A3"))),
B = Outline Box("Panel Box B", HListBox(Button Box("B1"), Button Box("B2"), Button Box("B3"))),
C = Outline Box("Panel Box C", HListBox(Button Box("C1"), Button Box("C2"), Button Box("C3"))),

B << close(1);
C << close(1);

If I open either B or C, I want A to be closed as a consequence of that action. I suppose what I'm effectively asking is this: how I can detect the action of opening a panel box by clicking on its blue diamond? If I can do that, the rest is easy.

Many thanks for any help!