[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] handle closing shell

>----- Oorspronkelijk bericht -----
>Van
: ian [mailto:ian@xxxxxx]
>Verzonden
: maandag
, augustus
 16, 2004 01:14 AM
>Aan
: eclipse-dev@xxxxxxxxxxx
>Onderwerp
: [eclipse-dev] handle closing shell
>
>Hi. Is there a way to handle a shell in its closing state? I would like
>to add a prompt before a user can close the main application through the
>'x' (close button).
>Thanks in advance.

shell.addDisposeListener(new DisposeListener() {

  public void widgetDisposed(DisposeEvent e) {
    e.doit = MessageDialog.openQuestion(shell, "Closing", "Really close?"));
  }

});

>
>- ian
>
>
>
>_______________________________________________
>eclipse-dev mailing list
>eclipse-dev@xxxxxxxxxxx
>To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>http://dev.eclipse.org/mailman/listinfo/eclipse-dev
>
>