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 13:27 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
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 17:05 Go to previous message
Stephan Leicht Vogt is currently offline Stephan Leicht VogtFriend
Messages: 102
Registered: February 2010
Location: Baden Switzerland
Senior 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: Thu Dec 18 15:30:19 GMT 2014

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

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