Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Open browser links in OS Default Web browser(I'm looking for information on how to open an hyperlink a user clicks in a Browser Widget in the Default OS Browser)
Open browser links in OS Default Web browser [message #498793] Wed, 18 November 2009 16:16 Go to next message
Ricky Patel is currently offline Ricky PatelFriend
Messages: 33
Registered: July 2009
Member
I'm sure this has been posted before but I'm looking for information on how to open hyperlinks that the user clicks in a Browser Widget in the Default OS Browser. Basically I have a low level email viewer that is running a Browser widget but everytime I click a link, it navigates to that page and away from the email. I would much rather it open up (for my case) a new firefox window and navigate to the link there.
Re: Open browser links in OS Default Web browser [message #498810 is a reply to message #498793] Wed, 18 November 2009 16:56 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

- add a LocationListener to the Browser, implement its "changing" method
- when this method is invoked:
- event.doit = false; // cancel the navigation in the Browser
- Program.launch(event.location); // launch an external browser on the
url

Grant


"Ricky Patel" <k2snowman69@yahoo.com> wrote in message
news:he16kk$go9$1@build.eclipse.org...
> I'm sure this has been posted before but I'm looking for information on
how to open hyperlinks that the user clicks in a Browser Widget in the
Default OS Browser. Basically I have a low level email viewer that is
running a Browser widget but everytime I click a link, it navigates to that
page and away from the email. I would much rather it open up (for my case) a
new firefox window and navigate to the link there.
Re: Open browser links in OS Default Web browser [message #503389 is a reply to message #498810] Sat, 12 December 2009 18:46 Go to previous message
Ricky Patel is currently offline Ricky PatelFriend
Messages: 33
Registered: July 2009
Member
Worked perfectly, thanks!
Previous Topic:Custom Native Widgets
Next Topic:How to highlight items with ListViewer when mouse moves?
Goto Forum:
  


Current Time: Thu Apr 25 01:23:42 GMT 2024

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

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

Back to the top