在同一行中動態添加按鈕你好,
基本上,我有一個數據表,可以用它創建一個報表,然後嘗試在同一行中向其中動態添加按鈕,但是這些按鈕位於表下方
這就是我得到的

我想要的是表格末尾“數字2”之後的“按鈕#1”
myPlatform = New Window( "name",
H List Box(
V List Box( bb = Col Box( "buttons" ), );
V List Box( myDispObj = dtSum << getAsReport );
)
);
rowList = myDispObj[Number Col Box( 1 )] << Get As Matrix;
rowList = As List( rowList );
bblist = {};
For( i = 1, i <= N Items( rowList ), i++,
bb_expr = Eval Insert( "\[bblist[i] = buttonbox("Button #" || char(i), doSomething(^i^))]\" );
Eval( Parse( bb_expr ) );
myPlatform << append( bblist[i] );
);數據表腳本編寫回复:在同一行動態添加按鈕您需要將按鈕附加到H列錶框中,
和順便說一句,H列錶框的元素需要用冒號“,”分隔。
BR

回复:在同一行動態添加按鈕此示例展示了另一種為您提供更多控制權的方法。

改編自顯示框 > 列框的腳本索引條目中給出的示例:
Names Default To Here( 1 );
New Window( "Button in Row",
exx = 1;
exy = 4;
exz = 8;
Table Box(
String Col Box( "strings", {"x", "y", "z"} ),
Number Col Box( "values", {exx, exy, exz} ),
Col Box(
"buttons",
Button Box( "Button 1" ),
Button Box( "Button 2" ),
Button Box( "Button 3" )
)
);
);