Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Close shell from within browser widget
Close shell from within browser widget [message #811536] Fri, 02 March 2012 08:27 Go to next message
Eclipse UserFriend
Hi,

In my RAP application I have a shell that only has one browser widget (full screen) as its content. Although the user has the possiblity to close this shell with the [x] button at the upper right corner, I like to automatically close the window after the work is done or offer the user a close button in the browser.

I cannot find a way to do this, so is this possible and if yes how?

Regards Bertin
Re: Close shell from within browser widget [message #811664 is a reply to message #811536] Fri, 02 March 2012 12:05 Go to previous message
Eclipse UserFriend
Hi Bertin

Sure you can close a shell automatically and also with a close button.
Here the code snippet for a simple button:
Button close = new Button(shell, SWT.CENTER | SWT.PUSH);
close.setText("Close");
close.addSelectionListener(new SelectionAdapter() {
  private static final long serialVersionUID = 1L;

  @Override
  public void widgetSelected(SelectionEvent e) {
    shell.close();
  }
});

With this snippet I'm sure you're also able to write your work-method which closes the shell automatically.

But as soon as Eclipse 3.8 is live you'll be able to start your Eclipse Scout App as RAP-Application out of the box Wink

Greetings Stephan
Previous Topic:Close shell from within browser widget
Next Topic:how to reduce the downloads?
Goto Forum:
  


Current Time: Tue Jul 22 12:44:46 EDT 2025

Powered by FUDForum. Page generated in 0.06919 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top