<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />你好,我们又见面了,
我有一个数据集,根据数据拉取而变化。我要做的是创建一个tabbox,其中包含多个与pull匹配的选项卡。例如,如果数据集中包含10个名称,那么将创建10个选项卡,如果下一个数据集只有5个名称,则只创建5个选项卡等:
// create a blank tabbox - I'll be appending to this later
CNTL_SET_Tabbox= tabbox();
//retrieve set names
Summarize( _b = By( :set_name ) );
//debug show the number of items
_b_cnt=N Items(_b);
show(_b_cnt);
//start FOR Loop
For( i = 1, i <= nitems( _b ), i++,
//debug show
show(_b);
//set name of tab
current_set = _b;
//create dummy box
displaybox_starting_point = hlistbox(vlistbox(textbox(_b)));
//append to tabbox
CNTL_SET_Tabbox << add (current_set, displaybox_starting_point);
);
//create new window
contrl_nw = New Window( "Set Names Analysis: ",
V List Box( Text Box( " " ), H List Box( close_cntrl_window, ) ),
Text Box( " " ),
Tab Box(
CNTL_SET_Tabbox
)
);
我正在使用上面的代码尝试让它工作,但是当我运行它时,所有显示的是新窗口,关闭按钮和空白tabbox:

任何人都可以帮助并告诉我哪里出错了...
修复了这个问题。看起来我的问题是试图在标签框中有一个标签框:
标签盒(
CNTL_SET _Tabbox
)
一旦我删除了这个上面的脚本工作