[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: SWT.MULTI in Tables
|
This works for me with the latest swt. Does the snippet below work for you?
And if so, can you change it to make it fail?
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setBounds(10,10,200,200);
shell.setLayout(new FillLayout());
Table table = new Table(shell, SWT.BORDER | SWT.VIRTUAL | SWT.H_SCROLL |
SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI);
table.setItemCount(99);
table.addListener(SWT.SetData, new Listener() {
public void handleEvent(Event event) {
((TableItem)event.item).setText("item " + event.index);
}
});
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
Grant
"David Perez" <craquerpro@xxxxxxxx> wrote in message
news:c3bcded117899d0a8886347c4876ed40$1@xxxxxxxxxxxxxxxxxx
> I have created a table with the SWT.BORDER | SWT.VIRTUAL | SWT.H_SCROLL |
> SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI under Win32 and SWT which
> comes with Eclipse 3.3.3, and doesn't allow me multi selection, only
> single selection, even though the SWT.MULTI bit is set.
>
> It used to work before, but now it doesn't anymore, and I can't see the
> cause.
> Any ideas please?
>