<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
)
一旦我刪除了這個上面的腳本工作