DCSETPARENT TO

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
jdsoft
Posts: 113
Joined: Thu Jan 28, 2010 1:13 pm
Location: Overberg
Contact:

DCSETPARENT TO

#1 Post by jdsoft »

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

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" 
But this does

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" 
Sometimes i build my Getlist in Procedures, that are not aware of parents. So this does not work.

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
But the code below should do it, if the function DC_GETCURRENTPARENT() would exist ;)

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
Does this make any sense :?:

Regards,
Jack Duijf
Regards,
Jack Duijf

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCSETPARENT TO

#2 Post by rdonnay »

Jack -

This is very difficult.
I think I need to figure out why you are having a problem with DCGROUP.

Roger
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCSETPARENT TO

#3 Post by rdonnay »

Jack -

Try removing the comment marker from in front of the following line of code in _dcgetbx.prg.

oOptions := oSetParent

Roger
The eXpress train is coming - and it has more cars.

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: DCSETPARENT TO

#4 Post by RDalzell »

Jack,

At the end of each DCTABPAGE I use:

DCSETPARENT TO

Never an issue after that.

Rick

John Hohensee

Re: DCSETPARENT TO

#5 Post by John Hohensee »

Take a look in User Contributions at my MakeOkCancel() and MakeButton() procedures
I use DCSETPARENT TO oBrow
the MakeOkCancel() or MakeButton()
followed with DCSETPARENT TO

Post Reply