Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] TABLE REFRESH PROBLEM

Where i found a snippet about jface-viewers???
thank you,
Michele

Il giorno lun, 22/10/2007 alle 23.08 +0200, Tom Schindl ha scritto:
> Hi,
> 
> What is the reason you are using so many TableEditors? Can't you use 
> JFace-Viewers which makes Tables/Trees editable with only one TableEditor?
> 
> Tom
> 
> Michele D'Urso schrieb:
> > Any solution???
> > 
> > I try usyng a row layout on a composite as a table.
> > Inside this composite i add another composite with three composite as
> > item colunms inside it so i will hava a row for the table.
> > adding more row i have a table but when i scroll i see the same
> > problem .
> > I do this.
> > 
> > Composite table = new Composite(shell,0);
> > table.setLayout(new RowLayout(SWT.VERTICAL));
> > 
> > GridLayout layout = new GridLayout();
> > layout..numColumns = 3;
> > 
> > Composite row1 = new Composite(table);
> > row1.setLayout(layout);
> > Composite row2 = new Composite(table);
> > row2.setLayout(layout);
> > Composite row3 = new Composite(table);
> > row3.setLayout(layout);
> > 
> > Text row1_item1 = new Text(row1);
> > Text row1_item2 = new Text(row1);
> > Text row1_item3 = new Text(row1);
> > 
> > 
> > This works as a table but the scroll does not work as in the image.
> > 
> > 
> > i attach 2 png image before and after i scroll the table.
> > Regards,
> > Michele
> > 
> > 
> > Il giorno ven, 19/10/2007 alle 19.24 -0400, Duong Nguyen ha scritto:
> >> While you are scrolling the items are not visible but when you stop
> >> scrolling are the items visible again? 
> >>
> >> Duong 
> >>
> >>
> >>
> >> "Michele D'Urso"
> >> <mmaikol@xxxxxxxx> 
> >> Sent by:
> >> platform-swt-dev-bounces@xxxxxxxxxxx 
> >>
> >> 10/19/2007 03:27 AM 
> >>          Please respond to
> >>   "Eclipse Platform SWT component
> >>          developers list."
> >>    <platform-swt-dev@xxxxxxxxxxx>
> >>
> >>
> >>
> >>
> >>                To
> >> "Eclipse Platform
> >> SWT component
> >> developers list."
> >> <platform-swt-dev@xxxxxxxxxxx> 
> >>                cc
> >>
> >>           Subject
> >> [platform-swt-dev] TABLE REFRESH PROBLEM
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> The problem is when i scroll the table.
> >> I have a refresh problem so i do not see the item in the table when i
> >> scroll.
> >>
> >> I use linux ubuntu (The same problem on slackware) with latest nvidia
> >> kernel modules and the latest swt api.
> >>
> >> thank you,
> >> Michele
> >>
> >> Here the complete snippet:
> >>
> >> package guitests;
> >>
> >> import org.eclipse.swt.SWT;
> >> import org.eclipse.swt.widgets.*;
> >> import org.eclipse.swt.custom.TableEditor;
> >> import org.eclipse.swt.graphics.Font;
> >> import org.eclipse.swt.layout.*;
> >>
> >> import pdf.*;
> >>
> >>
> >> public class ttt {
> >>                 private static Table table;
> >>
> >>                 private static Font font2;
> >>
> >>                 public ttt() {
> >>                                  super();
> >>                 }
> >>
> >>                 public static void main(String[] args) throws
> >> Exception {
> >>                                  Display display = new Display();
> >>                                  Shell shell = new Shell(display);
> >>                                  shell.setLayout(new FillLayout());
> >>
> >>                                  font2 = new Font(display, "Verdana",
> >> 10, SWT.NONE);
> >>
> >>                                  table = new Table(shell, SWT.BORDER|
> >> SWT.V_SCROLL);
> >>                                  table.setLayoutData(new
> >> GridData(GridData.FILL_BOTH));
> >>                                  table.setFont(font2);
> >>                                  table.setLinesVisible(true);
> >>                                  table.setHeaderVisible(true);
> >>
> >>
> >>  table.setBackgroundMode(SWT.INHERIT_DEFAULT);
> >>
> >>  table.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
> >>                                  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 (int i = 0; i < 50; i++) {
> >>                                                   TableItem item = new
> >> TableItem(table, SWT.WRAP);
> >>                                                   item.setText(0,
> >> "23423423424");
> >>                                                   item.setText(1,
> >> "Item desciption "+i);
> >>
> >>                                                   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();
> >>                                                   button.setData(i);
> >>
> >>
> >> edito.setEditor(button, item, 0);
> >>                                                   edito.setColumn(2);
> >>                                                   edito.setItem(item);
> >>                                  }
> >>                                  colonnacodice.pack();
> >>                                  colonnadescrizione.pack();
> >>                                  ordina.pack();
> >>                                  shell.open();
> >>
> >>                                  while (!shell.isDisposed()) {
> >>                                                   if (!
> >> display.readAndDispatch())
> >>
> >>  display.sleep();
> >>                                  }
> >>                                  display.dispose();
> >>
> >>                 }
> >>
> >> }
> >>
> >>
> >>
> >> --
> >> Email.it, the professional e-mail, gratis per te:
> >> http://www.email.it/f
> >>
> >> Sponsor:
> >> Un look da modella in pochi secondi, consigliato da Hunter Tylo
> >> * 
> >> * 
> >> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7111&d=19-10
> >> _______________________________________________
> >> platform-swt-dev mailing list
> >> platform-swt-dev@xxxxxxxxxxx
> >> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >>
> >> _______________________________________________
> >> platform-swt-dev mailing list
> >> platform-swt-dev@xxxxxxxxxxx
> >> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> > 
> >  
> >  
> >  --
> >  Email.it, the professional e-mail, gratis per te: http://www.email.it/f
> >  
> >  Sponsor:
> >  Vuoi un prestito fino a 30.000 Euro? Clicca qui per un preventivo immediato! Prometeo ti propone prestiti personali senza attese e senza spese.
> > * 
> >  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7161&d=22-10
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Prestiti da 1.500 a 30.000 Euro. Clicca qui per un preventivo immediato, richiedi subito lÂ’importo e la rata che desideri, con Prometeo basta un clic!
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7164&d=23-10


Back to the top