For the above code, unless i miss something, it is normal that nothing shows up since the checkbox status “false” is just an empty space.
To know if a group contains a listbox, since you are the one writing the script you can add to it the property “hasListbox”, set to true, and for the other groups do nothing. Then “if (something.hasListbox)” will tell you what you want. Not very constructive but it is simple and the fastest you can get. Otherwise, to know if ‘something’ is a listbox do “if something instanceof ListBox”. For instance to check if a group has a listbox in its immediate children it could be like this:
var hasListbox, K=theGroup.children.length, k;
for (k=0; k lt K; k++) if (theGroup.children[k] instanceof ListBox) {hasListbox = true; break;}
For a recursive search in eventual subgroups,
function search(cont, what)
{
if (cont instanceof what) return true;
if (cont.children) for (var K=cont.children.length, k=0; k lt K; k++) if (search(cont.children[k], what)) return true;
return false;
}
>> search(myGroup, ListBox);
Xavier