Frank, Lynn,

If you are on a control (like a DataWindow control), then
   ltabpage_1 = GetParent()
will give you the TabPage, rather than the Tab.

So you would need to add a reference to the TabPage like this
   ltabpage_1  = this.GetParent()
   ltab_parent = ltabpage_1.GetParent( )
to get a reference to the Tab that the TabPage is on.

// For a control, add one more level of GetParent()
// because the parentage is  DataWindow -> TabPage -> Tab
u_tab    a_tab
u_tabpg  a_tab_page

a_tab_page = this.GetParent()
a_tab      = a_tab_page.GetParent()

Lynn, to get the parent Window, you can simply use the PFC function
of_GetParentWindow().

Have fun,
~Sharon
--
Sharon Weinstrom Buntz      | mailto:[EMAIL PROTECTED]
Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/


Lynn Nguyen wrote:
> 
> Frank,
> 
> If I understand you correctly, here is the code to look for window parent
> from u_tabpg:
> 
> w_sheet    lw_test
> 
> lpo_object = this
> DO UNTIL lb_search = FALSE
>         lpo_object = lpo_object.GetParent()
>         IF NOT isValid( lpo_object ) THEN
>                 lb_search = FALSE
>                 return
>         ELSEIF ClassName( lpo_object ) = "w_test" THEN
>                 lb_search = FALSE
>                 lw_test = lpo_object
>         END IF
> LOOP
> 
> Hope this is what you are looking for.
> 
> Lynn Nguyen
> SoftWare Engineer
> IS Department
> UNIT PARTS COMPANY
> [EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: FRAIKIN Francis [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, November 18, 1999 10:06 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      PFCSIG Tab problems
> >
> > I'am trying to find the parent of an user object inherited from u_tabpg.
> > This object is place on another object inheited from u_tab who is on
> > a sheet window.
> > I'am using the scripts of the "Across Tab Pages" examples.
> >
> > I receive an error on the line "ltab_parent = GetParent()"
> >
> > Error Msg : Cannot assign object of type tabpage_1 to variable of type tab
> >
> > The code and the instance variables in my window and user objects seems
> > to be the same of the window w_tablink of the example.
> > _______________________________________________________
> > Francis FRAIKIN
> > MET - IG42              Tel : +32-4-2545816
> > Rue Ctte d'Or 253   Fax : +32-4-2530405
> > B-4000 LIEGE          E-mail : [EMAIL PROTECTED]
> > BELGIUM
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to