[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Blocking all navigation and events to Browser from interface.

Well...The thing about the below solution is that it will veto, that is, won't display anything, when you do a Browser.setText(String text), where 'text' contains html text at the beginning.

Grant Gayed wrote:

Mark,

You can veto or modify page changes in the changing event, as shown below:

browser.addLocationListener(new LocationAdapter() {
    public void changing(LocationEvent event) {
        event.doit = false; /* veto link traversals */
    }
});

Grant

"Mark Diggory" <mdiggory@xxxxxxxxxx> wrote in message
news:42A6EAFC.50607@xxxxxxxxxxxxx

Any takers? I think this has to be a common usecase?

Mark Diggory wrote:

I'm trying to use the Browser widget as a "Preview" of editor content.
I'd like to block (and possibly override) the users ability to activate
Links and form submit fields in the Browser so that they cannot navigate
off of the page. What is the best way to approach this?

thanks,
Mark Diggory