|
|
|
|
Re: Browser Widget and <Ctrl> N [message #451751 is a reply to message #451746] |
Tue, 08 March 2005 15:04 |
Kalman Hazins Messages: 76 Registered: July 2009 |
Member |
|
|
Veronika,
I tried the following code:
Browser browser = new Browser(parent, style);
browser.addOpenWindowListener(new OpenWindowListener() {
public void open(WindowEvent event) {
System.out.println("\n\nOPEN NEW BROWSER\n\n");
return;
}
});
When I hold down the shift key and click on a link inside the browser
widget - it goes into the open() method and prints OPEN NEW BROWSER, but
when I press <CTRL> N - it just opens C drive without going into the open()
method.
So, yes, I tried it and it didn't work.
Thanx,
- Kalman
"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:d0k5sn$8vp$1@www.eclipse.org...
> Popup menus can't define accelerators as you have discovered. Also
activeX
> controls get to process accelerators before the application and therefore
> even if you had a menu bar that defined the Ctrl N accelerator, IE would
> process it first.
>
> I think you can stop the new window using the OpenWindow event. The
javadoc
> for it says:
>
> * The navigation is cancelled if the event.required field is set to
> * true and the event.browser field is left <code>null</code>.
>
> Did this really not work?
>
>
> "Kalman" <kalman@zikal.com> wrote in message
> news:d0i6qe$ecd$1@www.eclipse.org...
> > If you have a pop up menu on the browser - the accelerator doesn't get
> > called, and a regular menu you got to have a shell (Decoration for). I
> > need
> > to create a createBrowser() method that will give me back a Browser that
> > will ignore Control-N.
> >
> > there's got to be a better way !!!
> >
> > Veronika, any ideas?
> >
> >
> >
> > "Christophe Cornu" <christophe_cornu@ca.ibm.com> wrote in message
> > news:d0i00k$bmm$1@www.eclipse.org...
> >> Hi Kalman,
> >>
> >> You can redirect <Ctrl>N by creating a MenuItem and using
> >> MenuItem.setAccelerator(SWT.CONTROL | 'n'). This menu item will be
> >> invoked
> >> instead of IE.
> >>
> >> Chris
> >>
> >>
> >
> >
>
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04201 seconds