4 level tab box example:
Names Default To Here( 1 );
// Make multiple lists that will define the multi-level hierarchical tab structure
nFirst = 5;
nSecondMax = 5;
nThirdMax = 5;
nForthMax = 5;
tabListFirst = {}; // first lists
tabListSecond = {}; // second lists
tabListThird = {}; // third lists
tabListForth = {}; // forth lists
For( i = 1, i <= nFirst, i++, //first level
Insert Into( tabListFirst, " L1 Tab " || Char( i ) );
secondList = {};
For( ii = 1, ii <= nSecondMax, ii++, //second level
Insert Into( secondList, "L2 Tab " || Char( ii ) );
thirdList = {};
For( iii = 1, iii <= nThirdMax, iii++,//third level
Insert Into( thirdList, "L3 Tab " || Char( iii ) );
forthList = {};
For( iiii = 1, iiii <= nForthMax, iiii++,//forth level
Insert Into( forthList, "L4 Tab " || Char( iiii ) )
);
Insert Into( tabListForth, Eval List( List( forthList ) ) );
);
Insert Into( tabListThird, Eval List( List( ThirdList ) ) );
);
Insert Into( tabListSecond, Eval List( List( secondList ) ) );
);
/*
Show( tabListFirst );
Show( tabListSecond );
Show( tabListThird );
Show( tabListForth );
*/
// Use these lists to build the UI
tb = Tab Box(); //first level of Tab Box
For( i = 1, i <= N Items( tabListFirst ), i++,
tb2 = Tab Box(); //second level of Tab Box
For( ii = 1, ii <= N Items( tabListSecond[i] ), ii++,
tb3 = Tab Box(); //third level of Tab Box
For (iii = 1, iii <= NItems ( tabListThird[ii]), iii++,
tb4 = Tab Box();
For (iiii = 1, iiii <= NItems ( tabListForth[iii]), iiii++,
tb4 << Add( tabListForth[iii][iiii] || " Tab",
Text Box( tabListFirst[i] ||"->"|| tabListSecond[ii][iii] ||"->"|| tabListThird[ii][iii] ||"->"|| tabListForth[iii][iiii]) )
);
tb3 << Add(tabListThird[ii][iii] || " Tab", tb4);
);
tb2 << Add ( tabListSecond[i][ii] || " Tab", tb3);
);
tb << Add( tabListFirst[i] || " Tab", tb2 );
);
New Window( "Example", tb );