2009-07-29 6 views

Répondre

5

Je ne pense pas qu'il existe une méthode directe pour ce faire. Mais comme une solution de contournement, essayez la méthode ci-dessous. J'ai utilisé quelque chose de similaire une fois.

public void moveTableItem(Table table, int from, int to) { 
    TableItem item2Move = table.getItem(from); 
    TableItem newTableItem = new TableItem(table, SWT.NONE, to); 
    newTableItem.setText(item2Move.getText()); 
    // You may want to clone the entire item here; and not just the text. 

    // Dispose off, the old item. 
    item2Move.dispose(); 

} 
+0

J'aime le son de ça! Je vais l'essayer. Je vous remercie. –

Questions connexes