🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
7 messages
7 total messages Started by Joyce Thu, 13 Apr 2006 14:39
CPPWebBrowser and ControlData
#584
Author: Joyce
Date: Thu, 13 Apr 2006 14:39
14 lines
1466 bytes
I wish to create a browser on a tabbed page at runtime, depending on the 
configuration of the system. I am worried that the IDE uses the ControlData 
property for something when it is not dynamically created, this data appears 
in the DFM file.

Should I be doing something to set this property when I create it 
dynamically and how is the property set, is it passed the address of a 
structure or array containing the bit pattern.

I examined the ControlData structure in olectnrs.hpp but the pattern in the 
DFM file does not seem to correspond in size.

TIA
Joyce
Re: CPPWebBrowser and ControlData
#585
Author: Hans Galema
Date: Thu, 13 Apr 2006 14:58
19 lines
1600 bytes
Joyce wrote:
> I wish to create a browser on a tabbed page at runtime, 

Do you mean an instance of TCppWebBrowser on a TTabSheet of a TPageContol ?

> depending on the 
> configuration of the system. 

That leaves me puzzled.

> I am worried that the IDE uses the ControlData 
> property for something when it is not dynamically created, this data appears 
> in the DFM file.

Don't understand that. As far as I know you don't have to bother with
ControlData. Just create the CppWebBrowser. If you tried already, what
where the actual problems ?

Hans.
Re: CPPWebBrowser and ControlData
#586
Author: Joyce
Date: Fri, 14 Apr 2006 08:20
30 lines
1898 bytes
"Hans Galema" <notused@notused.nl> wrote in message 
news:443e67f7$1@newsgroups.borland.com...
> Joyce wrote:
>> I wish to create a browser on a tabbed page at runtime,
>
> Do you mean an instance of TCppWebBrowser on a TTabSheet of a TPageContol 
> ?

Yes

>
>> depending on the configuration of the system.
>
> That leaves me puzzled.
>
>> I am worried that the IDE uses the ControlData property for something 
>> when it is not dynamically created, this data appears in the DFM file.
>
> Don't understand that. As far as I know you don't have to bother with
> ControlData. Just create the CppWebBrowser. If you tried already, what
> where the actual problems ?

On trying to create the control without using the ControlData, I do not 
think the Control is shown, the background is the TTabSheet color and not 
the white when created at designtime. The control must be created as it 
accesses the internet, but is not shown.

>
> Hans. 
Re: CPPWebBrowser and ControlData
#587
Author: Hans Galema
Date: Fri, 14 Apr 2006 09:41
10 lines
1423 bytes
Joyce wrote:

> On trying to create the control without using the ControlData, I do not 
> think the Control is shown, the background is the TTabSheet color and not 
> the white when created at designtime. The control must be created as it 
> accesses the internet, but is not shown.

No. Please show your code. Don't forget to set the parent.

Hans.
Re: CPPWebBrowser and ControlData
#588
Author: Hans Galema
Date: Fri, 14 Apr 2006 10:04
28 lines
1709 bytes
Hans Galema wrote:

> No. Please show your code. Don't forget to set the parent.

This works for me:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   TCppWebBrowser *CppWebBrowser = new TCppWebBrowser ( this );

   CppWebBrowser->TOleControl::Parent = TabSheet2;
   CppWebBrowser->Align = alClient;

   CppWebBrowser->Navigate ( WideString (
	"http://kb.lv.ukrtel.net/foto/albums/userpics/10005/12526_2.jpg"
	) );

   /*
   CppWebBrowser->Navigate ( WideString (
	"http://kb.lv.ukrtel.net/foto/displayimage.php?album=41&pos=0"
	) );
   */
}


Don't take to much luggage ...

Hans.
Re: CPPWebBrowser and ControlData
#589
Author: Joyce
Date: Fri, 14 Apr 2006 13:28
31 lines
1837 bytes
"Hans Galema" <notused@notused.nl> wrote in message 
news:443f74b6@newsgroups.borland.com...
> Hans Galema wrote:
>
>> No. Please show your code. Don't forget to set the parent.
>
> This works for me:
>
> void __fastcall TForm1::Button1Click(TObject *Sender)
> {
>   TCppWebBrowser *CppWebBrowser = new TCppWebBrowser ( this );
>
>   CppWebBrowser->TOleControl::Parent = TabSheet2;
>   CppWebBrowser->Align = alClient;
>
>   CppWebBrowser->Navigate ( WideString (
> "http://kb.lv.ukrtel.net/foto/albums/userpics/10005/12526_2.jpg"
> ) );
>
> Don't take to much luggage ...
>
> Hans.

I did try to set the Patent for CppWebBrowser but of course this did not 
exist.

By using CppWebBrowser->TOleControl::Parent everything now works.

Many Thanks,
Joyce 
Re: CPPWebBrowser and ControlData
#631
Author: James O'Brien
Date: Fri, 02 Jun 2006 16:08
12 lines
1610 bytes
> I wish to create a browser on a tabbed page at runtime, depending on the 
> configuration of the system. I am worried that the IDE uses the ControlData 
> property for something when it is not dynamically created, this data appears 
> in the DFM file.

I wouldn't worry about setting ControlData.  I think it stores 
information if you drag@drop content into the TCppWebBrowswer control 
during design time.  I accidentally dragged a URL link from an open IE 
window into a TCppWebBrowser control of a Form I was creating and the 
resulting web page kept appearing in the TCppWebBrowser control during 
both design/run-time.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads