Hi,
I want to create a window in JMP 9 containing an array of different types of controls as shown in the example below.
tb1 = text box(" Elementary "); tb2 = text box(" Intermediate "); tb3 = text box(" Advanced ");
bb1 = border box(tb1); bb1 << set background color("orange") << sides(15);
bb2 = border box(tb2); bb2 << set background color("yellow") << sides(15);
bb3 = border box(tb3); bb3 << set background color("cyan") << sides(15);
bblist = {};
insert into(bblist, bb1);
insert into(bblist, bb2);
insert into(bblist, bb3);
cb1 = check box(""); cb2 = check box(""); cb3 = check box("");
cblist = {};
insert into(cblist, cb1);
insert into(cblist, cb2);
insert into(cblist, cb3);
ab1 = button box("Chapter 1 References", << underline style(1));
ab2 = button box("Chapter 2 References", << underline style(1));
ab3 = button box("Chapter 3 References", << underline style(1));
ablist = {};
insert into(ablist, ab1);
insert into(ablist, ab2);
insert into(ablist, ab3);
mw = new window("My Window",
panel box("Controls",
lineup box(ncol(3),
bblist[1], cblist[1], ablist[1],
bblist[2], cblist[2], ablist[2],
bblist[3], cblist[3], ablist[3]
)
)
);
However, instead of just the three rows I've created above, I don't know in advance how many rows of controls I'm going to need: the actual number will be determined earlier in the script, which is why I've inserted them into a set of lists as I go, which can be as short or as long as I want. How can I modify the final new window creation command so that it will take in several lists of an unspecified (but equal) length, and get it to set out the various elements in the layout shown? I've tried an assortment of "for" loops and "eval list"s inside the "new window" command without success, but I still feel this ought to be very easy: I just can't see it.
Many thanks
[PS: Since posting this, I've just spotted a related discussion between "Volf", "Stig" and myself about 18 months ago at http://communities.sas.com/message/40093#40093, and realised I could apply the solution I came up with then, which was to create the "new window" command in text, using a "for" loop to add as many list elements as I need in the middle of it, and then eval(parse(...)) the end result, or alternatively use Stig's dynamic functions in some way. I still feel there ought to be an easier way in this instance however - can anybody see one?]
Message was edited by: David Rose