Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Disable links in Browser
Disable links in Browser [message #449721] Fri, 28 January 2005 08:49 Go to next message
Eclipse UserFriend
Originally posted by: dorus.savatech.ro

Hello everybody,
I have the following problem: I need to display a html file using
browser component, but with following behavior: when the user clicks on
a link, I want that the browser should not change its location, the
original location should be preserved.

I tried to do this via LocationListener, inside changing() method, but
if there I set the browser url to the original one, the JVM crash.

Any suggestion?
Thank you very much.
Doru
Re: Disable links in Browser [message #449723 is a reply to message #449721] Fri, 28 January 2005 10:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kostask.vector.gr

Doru Sular wrote:
> Hello everybody,
> I have the following problem: I need to display a html file using
> browser component, but with following behavior: when the user clicks on
> a link, I want that the browser should not change its location, the
> original location should be preserved.
>
> I tried to do this via LocationListener, inside changing() method, but
> if there I set the browser url to the original one, the JVM crash.
>
> Any suggestion?
> Thank you very much.
> Doru

I did that just yesterday, so consider yourself lucky ;-)

browser.addLocationListener(new LocationAdapter() {
public void changing(LocationEvent event) {
event.doit = false;
}
});
Re: Disable links in Browser [message #449750 is a reply to message #449723] Fri, 28 January 2005 14:31 Go to previous message
Eclipse UserFriend
Originally posted by: dorus.savatech.ro

Thank you very much :)
Doru

Kostas Kokkoros wrote:
> Doru Sular wrote:
>
>> Hello everybody,
>> I have the following problem: I need to display a html file using
>> browser component, but with following behavior: when the user clicks
>> on a link, I want that the browser should not change its location, the
>> original location should be preserved.
>>
>> I tried to do this via LocationListener, inside changing() method, but
>> if there I set the browser url to the original one, the JVM crash.
>>
>> Any suggestion?
>> Thank you very much.
>> Doru
>
>
> I did that just yesterday, so consider yourself lucky ;-)
>
> browser.addLocationListener(new LocationAdapter() {
> public void changing(LocationEvent event) {
> event.doit = false;
> }
> });
Previous Topic:Is there a SWT list-like widget that displays items in two or more columns?
Next Topic:Browser widget question
Goto Forum:
  


Current Time: Sat Apr 20 01:21:09 GMT 2024

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

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

Back to the top