DCSETPARENT TO
Posted: Mon Oct 18, 2010 1:27 pm
Hello,
I am looking for function to retrieve the current DCSETPARENT.
I am experiencing problems if there is a DCGROUP in a DCTABPAGE.
The code below does not work ok
But this does
Sometimes i build my Getlist in Procedures, that are not aware of parents. So this does not work.
But the code below should do it, if the function DC_GETCURRENTPARENT() would exist
Does this make any sense
Regards,
Jack Duijf
I am looking for function to retrieve the current DCSETPARENT.
I am experiencing problems if there is a DCGROUP in a DCTABPAGE.
The code below does not work ok
Code: Select all
DCSETPARENT oTabPage
@ 1,1 DCGROUP oGroup CAPTION "A box" SIZE 40,4
@ 1,1 DCSAY "Hello in groupbox" PARENT oGroup
@ 6,1 DCSAY "Hello in tabpage"
Code: Select all
DCSETPARENT oTabPage
@ 1,1 DCGROUP oGroup CAPTION "A box" SIZE 40,4
@ 1,1 DCSAY "Hello in groupbox" PARENT oGroup
DCSETPARENT oTabPage
@ 6,1 DCSAY "Hello in tabpage"
Code: Select all
DCSETPARENT oTabPage
My_MakeGroup(GetList)
@ 6,1 DCSAY "Hello in tabpage"
..
Procedure My_MakeGroup(GetList)
@ 1,1 DCGROUP oGroup CAPTION "A box" SIZE 40,4
@ 1,1 DCSAY "Hello in groupbox" PARENT oGroup
Return

Code: Select all
DCSETPARENT oTabPage
My_MakeGroup(GetList)
@ 6,1 DCSAY "Hello in tabpage"
..
Procedure My_MakeGroup(GetList)
LOCAL oParent := DC_GETCURRENTPARENT(GetList)
@ 1,1 DCGROUP oGroup CAPTION "A box" SIZE 40,4
@ 1,1 DCSAY "Hello in groupbox" PARENT oGroup
DCSETPARENT TO oParent
Return

Regards,
Jack Duijf