Path: news.mathworks.com!not-for-mail
From: "karthikeyan " <kanandhi2k@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Hyperlink in Web Browser and ActiveXControl
Date: Tue, 27 Jan 2009 07:58:04 +0000 (UTC)
Organization: Emmeskay Inc
Lines: 42
Message-ID: <glmeqc$gt2$1@fred.mathworks.com>
References: <famka8$5k7$1@fred.mathworks.com> <famovi$l5o$1@fred.mathworks.com> <famppt$4q8$1@fred.mathworks.com> <faq1j7$pj0$1@fred.mathworks.com> <fatt20$cuj$1@fred.mathworks.com>
Reply-To: "karthikeyan " <kanandhi2k@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233043084 17314 172.30.248.37 (27 Jan 2009 07:58:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Jan 2009 07:58:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1096717
Xref: news.mathworks.com comp.soft-sys.matlab:514165


"Mifano " <nchminh@gmail.com> wrote in message <fatt20$cuj$1@fred.mathworks.com>...
> "Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
> <faq1j7$pj0$1@fred.mathworks.com>...
> > "Mifano " <nchminh@gmail.com> wrote in message
> > <famppt$4q8$1@fred.mathworks.com>...
> > > <snip>Is there some way to display a web page by
> > > using web() on GUI? 
> > 
> > Not easily: web() opens a separate browser window which you
> > cannot embed in a GUI. However, you can use the following
> > undocumented hack to do this:
> > 
> > url = 'www.cnn.com';
> > browser = com.mathworks.mlwidgets.html.HTMLBrowserPanel(url);
> > pos = [10,10,400,300];
> > javacomponent(browser,pos,gcf);
> > 
> > You can add toolbar etc. by activating methods on the
> > browser object as follows (type "methodsview(browser)" for
> > the full list):
> > 
> > browser.addToolbar;
> > 
> > Yair Altman
> > http://ymasoftware.com
> > 
> 
> Thank you, that's really helpful.

Hi Yair Altman,

I have been creating the Matlab GUI in which to display the html file, the file contains some matlab command in the few lines.

Initially, I was working using activexcontrol where i found it difficult to invoke matlab commands. 

Recently, I saw your reply using ".HTMLBrowserPanel" which will resolve my issue but i need some action in addition to the display the html file.

1. I need to know the way to get the selected text in the html file. I mean that if i would select some text using mouse in the displayed html file. How do i get it? what's the way from browser data structure.

2. If i display the multiple html files in the same browser, I need to switch between the html file without refreshing(It's mandatory). Of course, I can addToolbar where i can click Back and Forward buttons, But i need an API to invoke Back and Forward

Thanks in advance