JMP對話框中的網格控制?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />嗨伙計,
有沒有人想出如何在JMP對話框中進行某種網格控制?類似於VB中的SCgrid?我想顯示一個可滾動的表格,其中包含可點擊的控件。
謝謝,
彼得
Re:JMP對話框中的網格控制?很酷!!!
Re:JMP對話框中的網格控制?這是一種替代方法,使用填充BorderBoxes,MouseBoxes和TextBoxes的LineupBox,其作用類似於表格。 MouseBox可以提供可點擊的控件,BorderBox可以提供對錶格單元格進行著色的功能。
Re:JMP對話框中的網格控制?非常感謝MS!我拿了你的代碼並稍微改了一下,以便每個按鈕都是“Go”圖標:
DT = 打開 ( “$ sample_data \ Car Physical Data.jmp” ) ;
當前數據表 ( DT ) ;
model_list = : 模型 << 得到價值 ;
COUNTRY_LIST = : 國家 << 得到價值 ;
TYPE_LIST = : 類型 << 得到價值 ;
weight_list = : 重量 << 得到價值 ;
turn_list = : 轉圈 << 得到價值 ;
disp_list = : 移位 << 得到價值 ;
horse_list = : 馬力 << 得到價值 ;
gas_list = : 氣罐尺寸 << 得到價值 ;
action_list = {} ;
bb_text = “” ;
對於 ( 一世 = 1 ,一世 <= NROWS ( DT ) ,一世 ++,
公元前 = “B” || 燒焦 ( 一世 ) ;
bb_text = bb_text || 公元前 || “=按鈕框(\!”\!“,打印(\!”“) || 公元前 || “\!”); ),“ ;
) ;
col_box_expr = “col box(\!”Action \!“,” || bb_text || “)” ;
新窗戶 ( “汽車” ,
結核病 = 錶盒 (
EVAL ( 解析 ( col_box_expr )) ,
String Col Box ( “模型” , model_list ) ,
String Col Box ( “國家” , COUNTRY_LIST ) ,
String Col Box ( “類型” , TYPE_LIST ) ,
數字Col Box ( “重量” , weight_list ) ,
劇情箱 ( “” , weight_list ) ,
數字Col Box ( “轉動圈” , turn_list ) ,
數字Col Box ( “移位” , disp_list ) ,
數字Col Box ( “馬力” , horse_list ) ,
數字Col Box ( “氣罐尺寸” , gas_list ) ,
劇情箱 ( “” , gas_list ) ,
)
) ;
結核病 << 設置Scrollable ( 25 , 0 ) ;
結核病 << 桌子風格 ( 斜 ) ;
對於 ( 一世 = 1 ,一世 <= NROWS ( DT ) ,一世 ++,
公元前 = “B” || 燒焦 ( 一世 ) ;
button_expr = 公元前 || “<< set icon(\!”Go \!“)” ;
EVAL ( 解析 ( button_expr )) ;
) ;
很酷的結果。 單擊按鈕可顯示按下了哪個按鈕。

Re:JMP對話框中的網格控制?Col Box在其參數中與Outline Box類似。 您可以建立類似於Peter所做的列表:
action_col = col box(“Action”);
for(i = 1,i <= nrows(dt),i ++,
bb_text =“action_col << append(按鈕框(\!”打開\!“,打印(i)))”;
的eval(解析(bb_text));
);
現在您有了可以添加到表中的列。
Re:JMP對話框中的網格控制?只是 action_list [1] 有效,但不是整個清單。因此,Col Box()似乎無法解析顯示框列表,這通常意味著必須製作和解析一個巨大的表達式字符串。
DT = 打開 ( “$ sample_data \ Car Physical Data.jmp” ) ;
當前數據表 ( DT ) ;
model_list = : 模型 << 得到價值 ;
COUNTRY_LIST = : 國家 << 得到價值 ;
TYPE_LIST = : 類型 << 得到價值 ;
weight_list = : 重量 << 得到價值 ;
turn_list = : 轉圈 << 得到價值 ;
disp_list = : 移位 << 得到價值 ;
horse_list = : 馬力 << 得到價值 ;
gas_list = : 氣罐尺寸 << 得到價值 ;
bb_text = “按鈕框(\!”打開\!“,打印(1))” ;;
對於 ( 一世 = 2 ,一世 <= NROWS ( DT ) ,一世 ++,
bb_text = bb_text || “,” || 燒焦 ( 替代 ( nameexpr ( 按鈕框 ( “打開” ,打印 ( EXPR ( 一世 )))) , EXPR ( 一世 ) ,一世 )) ;
) ;
col_box = “col box(\!”Action \!“,” || bb_text || “)” ;
新窗戶 ( “汽車” ,
結核病 = 錶盒 (
EVAL ( 解析 ( col_box )) ,
String Col Box ( “模型” , model_list ) ,
String Col Box ( “國家” , COUNTRY_LIST ) ,
String Col Box ( “類型” , TYPE_LIST ) ,
數字Col Box ( “重量” , weight_list ) ,
劇情箱 ( “” , weight_list ) ,
數字Col Box ( “轉動圈” , turn_list ) ,
數字Col Box ( “移位” , disp_list ) ,
數字Col Box ( “馬力” , horse_list ) ,
數字Col Box ( “氣罐尺寸” , gas_list ) ,
劇情箱 ( “” , gas_list ) ,
)
) ;
結核病 << 設置Scrollable ( 25 , 0 ) ;
結核病 << 桌子風格 ( 斜 ) ;
Re:JMP對話框中的網格控制?差不多了。 不知道col box,除了在Help> Scripting Index中簡要提及之外,沒有任何記錄。 也許有人可以幫助我讓這個例子起作用:
DT = 打開 ( “$ sample_data \ Car Physical Data.jmp” ) ;
當前數據表 ( DT ) ;
model_list = : 模型 << 得到價值 ;
COUNTRY_LIST = : 國家 << 得到價值 ;
TYPE_LIST = : 類型 << 得到價值 ;
weight_list = : 重量 << 得到價值 ;
turn_list = : 轉圈 << 得到價值 ;
disp_list = : 移位 << 得到價值 ;
horse_list = : 馬力 << 得到價值 ;
gas_list = : 氣罐尺寸 << 得到價值 ;
action_list = {} ;
對於 ( 一世 = 1 ,一世 <= NROWS ( DT ) ,一世 ++,
bb_text = “action_list =按鈕框(\!“打開\!”,打印(i))“ ;
EVAL ( 解析 ( bb_text )) ;
) ;
新窗戶 ( “汽車” ,
結核病 = 錶盒 (
col盒子 ( “行動” , action_list ) ,
String Col Box ( “模型” , model_list ) ,
String Col Box ( “國家” , COUNTRY_LIST ) ,
String Col Box ( “類型” , TYPE_LIST ) ,
數字Col Box ( “重量” , weight_list ) ,
劇情箱 ( “” , weight_list ) ,
數字Col Box ( “轉動圈” , turn_list ) ,
數字Col Box ( “移位” , disp_list ) ,
數字Col Box ( “馬力” , horse_list ) ,
數字Col Box ( “氣罐尺寸” , gas_list ) ,
劇情箱 ( “” , gas_list ) ,
)
) ;
結核病 << 設置Scrollable ( 25 , 0 ) ;
結核病 << 桌子風格 ( 斜 ) ;
Re:JMP對話框中的網格控制?在JMP 10中,Table Box有一個Set Scrollable消息和Col Box,它是一個顯示表列,其中每一行都是您選擇的不同顯示框。
我還沒試過的另一個選擇是在Scroll Box中放置一個Lineup Box。