|
The following code should do it:
"Self" in this case is a panel or a form,
etc:
procedure AddNewWebBrowser;
var wb: TWebBrowser; begin
wb := TWebBrowser.Create(self); wb.Align := alClient;
wb.visible := True; self.InsertControl( wb );
end;
HTH
Xander
----- Original Message -----
Sent: Thursday, September 26, 2002 12:07
PM
Subject: [DUG-DB]: Problems with a
webbrowser component
Hi everyone
I have a query on behalf of one of our
research students here at Massey. She wants to create a number of web browser
components in a Delphi form. We can do that easily using the drag-and-drop
interface, from the toolbars, and make them work fine. However, in this case,
she needs to create an arbitrary number of the components, so she plans to
do the creation dynamically and store them in a tList. The dynamic
creation, and putting the components into the list work fine, but the problem
comes when we try to see one of the web browsers.
She's tried to
assign the newly created web browser's parent property, as you need to
do with dynamically created components so that they receive events, and
display themselves.
But Delphi says that the parent property of a
tWebBrowser component is read-only, and refuses to assign anything to
it.
Does anyone have any suggestions?
Thanks Paul
Lyons
_________________________________________________ Paul
Lyons
Senior Lecturer in Computer
Science
Institute of Information Sciences and Technology Massey
University
Private Bag
11-222
Palmerston
North
New Zealand
Phone: (+64) 6 350 5799 2472
Fax:
(+64) 6 350 2259
Email:
[EMAIL PROTECTED] URL: http://www-ist.massey.ac.nz/PLyons
_________________________________________________
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
|