Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser Widget, surpress CTRL-N with setUrl
SWT Browser Widget, surpress CTRL-N with setUrl [message #717779] Mon, 22 August 2011 06:35 Go to next message
Eclipse UserFriend
Hello,

i'm using an SWT Browser Widget to embed a RIA Application in a Desktop Application. I would like to use setUrl(...) and not setText(...) to start the application, because for some reason the application (Silverlight) won't load with setText(...) probably because of cross domain restrictions.

Now Ctrl-N opens a new browser window which might be confusing for the user, so I would like to surpress this behaviour (also Ctrl-L, Ctrl-P, etc). I've read so far that setText(...) does this. Is there any possibility to make setUrl(...) behave the same way?

I tried it with setting accelerators on menu items to override Ctrl-N, but that doesn't seem to work with setUrl(...) either, only with setText(...).

I've debugged into the WebSite.class in SWT win32 (latest eclipse indigo version) and have seen that with setUrl(...) translateAccelerators doesn't get called.

Can someone give me a hint what I could change so both methods behave the same way?

Any help or hints are highly appreciated.

Kind Regards,
Onno
Re: SWT Browser Widget, surpress CTRL-N with setUrl [message #718507 is a reply to message #717779] Wed, 24 August 2011 10:25 Go to previous messageGo to next message
Eclipse UserFriend
Hi Onno,

If WebSite.translateAccelerators() was being invoked then these IE
accelerators would likely already have their functionality disabled. I
have not experimented much with running Silverlight in the Browser
control, so I don't have a solution to offer off the top of my head. If
you log a bug with SWT at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=SWT
with this info then this can be investigated.

Grant


On 8/22/2011 6:35 AM, Onno wrote:
> Hello,
>
> i'm using an SWT Browser Widget to embed a RIA Application in a Desktop
> Application. I would like to use setUrl(...) and not setText(...) to
> start the application, because for some reason the application
> (Silverlight) won't load with setText(...) probably because of cross
> domain restrictions.
>
> Now Ctrl-N opens a new browser window which might be confusing for the
> user, so I would like to surpress this behaviour (also Ctrl-L, Ctrl-P,
> etc). I've read so far that setText(...) does this. Is there any
> possibility to make setUrl(...) behave the same way?
>
> I tried it with setting accelerators on menu items to override Ctrl-N,
> but that doesn't seem to work with setUrl(...) either, only with
> setText(...).
>
> I've debugged into the WebSite.class in SWT win32 (latest eclipse indigo
> version) and have seen that with setUrl(...) translateAccelerators
> doesn't get called.
>
> Can someone give me a hint what I could change so both methods behave
> the same way?
>
> Any help or hints are highly appreciated.
>
> Kind Regards,
> Onno
Re: SWT Browser Widget, surpress CTRL-N with setUrl [message #880250 is a reply to message #718507] Fri, 01 June 2012 13:53 Go to previous message
Eclipse UserFriend
I have a similar problem here.

My RCP application has some commands that have their own hotkeys, and some of them are the same from IE (F5 and Ctrl+L are two examples).

On one of my views I have an SWT Browser, and when it has focus and I press those hotkeys, the browser catches them before my RCP application.

I'm still trying to solve this and I'd like to know what you think about it.

An important note here is that we still use SWT 3.2 (yeah, I know it's pretty old, but we can't update it now).

[Updated on: Fri, 01 June 2012 14:36] by Moderator

Previous Topic:pasting multiple lines in scripting console on Windows
Next Topic:swt table itemcount doubt
Goto Forum:
  


Current Time: Sun Aug 31 00:08:49 EDT 2025

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

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

Back to the top