[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How to make the table cells editable.

Thanks Yves,

I got it to work on SWT.MouseDown inside a table cell:
    table.addListener (SWT.MouseDown, new Listener () {
          public void handleEvent (Event event)
(editClickedTableCellEx(event);
            ...
      } });

I also would like to use the arrow keys to navigate through the table cells,
     tableCursor.addSelectionListener(new SelectionAdapter() {
         public void widgetSelected(SelectionEvent e) {
             ;;;
        }
        public void widgetDefaultSelected(SelectionEvent e) {
            ;;;;
        }
   }

However, once I added the _tableCursor.addSelectionListener(new
SelectionAdapter(),
the SWT.MouseDown no longer works.  Please help.

Best Regards,
sl


"Yves Harms" <user@xxxxxxxxxxxxxx> wrote in message
news:d4tftq$f7d$1@xxxxxxxxxxxxxxxxxxx
> There are two ways
> - plain SWT table:
> See the SWT snippets for examples
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/de
v.html#snippets
>
> - JFACE Tableviewer:
> Search this newsgroup for "tableviewer" for examples and read the
> documentation in the eclipse help.
>
> Yves
>
> > Hi,
> >
> > I have a table with 3 columns and would like to be able to make
> > the 2nd and 3rd columns editable.  Which of the following object
> > should I use?
> >
> > org.eclipse.swt.widgets.Table
> > or
> > org.eclipse.jface.viewers.TableViewer
> >
> > Does anyone has some code snippet to share?
> >
> > Thanks
> > sl
> >
> >