Board index » cppbuilder » how toaccess the form embedded in Ttabsheet

how toaccess the form embedded in Ttabsheet


2004-10-22 10:30:38 PM
cppbuilder79
Hi al,
How do i access a form emdded in a tabsheet?
I instaniated the tabsheet and the form dynamically and assigned the parent
property of the form as the tabsheet.
I am trying to read from that form in another function and want to access
the members of that form. I have the pointer to the tabsheet available to
me. Please help
Thanks
Chintan
 
 

Re:how toaccess the form embedded in Ttabsheet

Chintan Desai wrote:
Quote
I instaniated the tabsheet and the form dynamically and assigned the parent
property of the form as the tabsheet.

I am trying to read from that form in another function and want to access
the members of that form. I have the pointer to the tabsheet available to
me.
But where is your pointer to the form ? If you assigned the Parent of
the form dynamic than you know the pointer. So why is that a problem ?
Hans.
 

Re:how toaccess the form embedded in Ttabsheet

There are some reasons to think about using
TFrame instead of TForm to be enbedded into
TTabSheet.
Best regards,
Vladimir Stefanovic
Chintan Desai < XXXX@XXXXX.COM >wrote in message
Quote
Hi al,

How do i access a form emdded in a tabsheet?

I instaniated the tabsheet and the form dynamically and assigned the
parent
property of the form as the tabsheet.

I am trying to read from that form in another function and want to
access
the members of that form. I have the pointer to the tabsheet
available to
me. Please help

Thanks
Chintan


 

{smallsort}

Re:how toaccess the form embedded in Ttabsheet

"Chintan Desai" < XXXX@XXXXX.COM >wrote in message
Quote
How do i access a form emdded in a tabsheet?
Use the TabSheet's Controls[] property. If the form is the only child of
the TabSheet, then you would access it like this:
TMyForm *form = (TMyForm*) TheTabSheet->Controls[0];
Gambit