Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
Bertin Kiekebosch is currently offline Bertin Kiekebosch
Messages: 279
Registered: August 2011
Senior Member
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
Stephan Leicht Vogt is currently offline Stephan Leicht Vogt
Messages: 99
Registered: February 2010
Location: Baden Switzerland
Member

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:Problem with ViewStack org.eclipse.rap.design.example.stack.view
Next Topic:Rap on Mobile Platforms
Goto Forum:
  


Current Time: Wed Apr 16 03:28:59 EDT 2014

Powered by FUDForum. Page generated in 0.03172 seconds