Path: news.mathworks.com!not-for-mail
From: "Mifano " <nchminh@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Hyperlink in Web Browser and ActiveXControl
Date: Thu, 30 Aug 2007 09:15:32 +0000 (UTC)
Organization: ALTRAN
Lines: 71
Message-ID: <fb61rk$bd5$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> <fb39m1$iki$1@fred.mathworks.com> <fb3c2h$kf9$1@fred.mathworks.com>
Reply-To: "Mifano " <nchminh@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 1188465332 11685 172.30.248.37 (30 Aug 2007 09:15:32 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 30 Aug 2007 09:15:32 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 407380
Xref: news.mathworks.com comp.soft-sys.matlab:426249



"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
<fb3c2h$kf9$1@fred.mathworks.com>...
> > "Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
> > > <snip>you can use the following
> > > undocumented hack to do this:
> > 
> > However, I didn't found any document about the class
> > com.mathworks.mlwidgets.html.HTMLBrowserPanel. 
> > Could you tell me where to find these documents?
> 
> As I said above, it's UNDOCUMENTED (which means, well,
> there's no documentation). It's an internal Matlab class
> that is not meant to be used by anyone outside MathWorks.
> You can use it, but you're on your own here...
> 
> > I'm looking for the refresh and resize functions of this
> > web page.  
> 
> You can get/set the browser object properties in the regular
> Matlab fashion, using the get/set functions:
> 
> browser=com.mathworks.mlwidgets.html.HTMLBrowserPanel(url);
> get(browser)
> set(browser,propertyName,newValue);
> 
> You can also do the same for the objects returned by the
> javacomponent function (including updating the component's
> position, units etc.)
> 
> Yair Altman
> 


Thank you for you reply. Could you please answer to some
questions related:

1) Problem 1

I tried this code sample:

figure(1)
url = 'www.google.com';
browser = com.mathworks.mlwidgets.html.HTMLBrowserPanel(url);
pos = [10,10,400,300];
jCompObj = javacomponent(browser,pos,gcf);

% Get current dimension 
jCompObj.Width
jCompObj.Height

% Change dimension 
jCompObj.setSize(10,10) ;

% Verify dimension 
jCompObj.Width
jCompObj.Height

The new dimension of browser now is 10x10 but on figure(1),
there's nothing changed (the dimension of web page is always
    400x300). 

Could you tell me how to update the modification of these
properties.

2) Problem 2

Some time I have to modify the file in 'url'. How can I
"refresh" the web page on figure? 

Thank you very much