Y a-t-il une fonction qui peut remplacer la table entière à l'intérieur d'une boîte de table?Une boîte de tableau vide / par défaut est apparue et je souhaitais remplacer la boîte de tableau entière à l'aide du script ci-dessous. Est-il possible de mettre à jour [table box] avec
Ce script que j'utilise maintenant est fastidieux:
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()
);Merci d'avance:)
Re: Y at-il une fonction qui peut remplacer la table entière à l'intérieur d'une boîte de table?J'ai trouvé qu'il est plus facile de supprimer et de remplacer la table plutôt que de mettre à jour. Le script simple ci-dessous illustre cette méthodologie
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 );