[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] TABLE REFRESH PROBLEM
|
In the last day i'm trying to solve a refresh problem on a Table .
When i insert in a table a TableEditor or only inserting more then 30
Items i see some problems of refresh scrolling the table.
I use linux and i have an nvidia card with 128MB of ram and the correct
kernel modules.
Why this refresh problem ??? I use the last swt version.
Thank you,
Michele
Code snippet:
##Method that create the table
private void createTable() {
if (table == null || table.isDisposed())
return;
// table.setLayout(new FillLayout());
table.setLinesVisible(true);
table.setHeaderVisible(true);
table.setBackgroundMode(SWT.INHERIT_DEFAULT);
table.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
// prelevo gli items
GetItemsCatalogo items = new GetItemsCatalogo(this, ana, prodotto
.getCodicecatalogo());
items.start();
}
## method to add table items
public void addItems(CatalogoItem[] items) {
// colonne delle tabelle
TableColumn colonnacodice = new TableColumn(table, SWT.NONE);
colonnacodice.setText("CODICE");
TableColumn colonnadescrizione = new TableColumn(table, SWT.NONE);
colonnadescrizione.setText("DESCRIZIONE");
TableColumn ordina = new TableColumn(table, SWT.NONE);
ordina.setText("ORDINA");
for (CatalogoItem i : items) {
TableItem item = new TableItem(table, SWT.WRAP);
item.setText(0, i.getCodicefornitore());
item.setText(1, i.getDescrizione());
TableEditor edito = new TableEditor(table);
edito.horizontalAlignment=SWT.CENTER;
edito.verticalAlignment=SWT.CENTER;
edito.minimumWidth=60;
Button button = new Button(table,SWT.NONE);
button.setText("Ordina");
button.pack();
edito.setEditor(button,item,0);
edito.setColumn(2);
edito.setItem(item);
}
colonnacodice.pack();
colonnadescrizione.pack();
ordina.pack();
}
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Fai squillare la PANTERA ROSA sul tuo cellulare: e' in REGALO
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6613&d=18-10