[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] close a shell without closing application?

I've got an application that open a display and a shell.
In this aplication, I've got a button that open another shell. I can close
only this shell with the cross of the shell, but I want to add a close
button to that from my shell. The problem is that with this button, I
close the whole aplication and not only my shell !!

I've tried those things :


quitter.addSelectionListener(new SelectionAdapter() {
  public void widgetSelected(SelectionEvent event) {
    event.item.getDisplay().getActiveShell().close();

  }
});

event.item.getDisplay().getActiveShell().close(); => close all and set an
error
getShell().close(); => close all (with no errors)
close() => close all with no errors

Have you got any propositions ??

Thanks Eric.