是否有一個函數可以替換錶格框內的整個表格?我有一個空/默認表格框,我想用下面的腳本替換整個表格框。有沒有辦法更新[表格框]
我現在使用的這個腳本很乏味:
button box("UPDATE",
dtmain = Open(filename, invisible);
tb << delete row( 1 );
tb << delete row( 1 );<BR /> // 50 lines of delete row()<BR />
tb << insert row( 1, {"a", 1} );
tb << insert row( 1, {"b", 2} ); <BR /> // 50 lines of insert row()
);提前致謝:)
Re:有沒有一個函數可以替換錶格框內的整個表格?我發現它更容易刪除和替換錶,而不是更新。 下面的簡單腳本說明了這種方法
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
New Window( "The Table",
vlb = V List Box(),
theButton = Button Box( "UPDATE",
Try( theTable << delete );
theList = {};
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
theTable = Table Box( String Col Box( "Name", theList ) );
vlb << append( theTable );
)
);
// Initialize the table
theList = {};
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
theTable = Table Box( String Col Box( "Name", theList ) );
vlb << append( theTable );