¿Existe una función que pueda reemplazar la tabla completa dentro de un cuadro de tabla?Aparece un cuadro de tabla vacío / predeterminado, y quería reemplazar todo el cuadro de la tabla utilizando el siguiente script. ¿Hay una manera de actualizar [cuadro de tabla] con
Este script que estoy usando ahora es tedioso:
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()
);Gracias por adelantado:)
Re: ¿Existe una función que pueda reemplazar la tabla completa dentro de un cuadro de tabla?Descubrí que es más fácil eliminar y reemplazar la tabla, en lugar de actualizarla. El simple script a continuación ilustra esa metodología.
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 );