Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Hyperlink in Web Browser and ActiveXControl
Date: Thu, 30 Aug 2007 14:46:02 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 39
Message-ID: <fb6l7a$qs9$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> <fb61rk$bd5$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1188485162 27529 172.30.248.37 (30 Aug 2007 14:46:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 30 Aug 2007 14:46:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:426299



> 1) Problem 1
> 
> 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.

[jCompObj,hCompObj] = javacomponent(browser,pos,gcf);
set(hCompObj,'pos',[30,30,600,200]);
set(hCompObj, 'units','normalized', 'pos',[.1,.2,.3,.4]);  %
better

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

browser.setCurrentLocation('www.cnn.com');

Yair Altman