Page 1 of 1

DCRADIO question

Posted: Thu May 02, 2013 2:24 pm
by Janko
Dear all,

Code: Select all


@ 1,10  DCGROUP oGroup0 CAPTION 'Izberi Ĩasovni interval' SIZE 19,6
@ 1,1   DCRADIO cLMQ VALUE 'L'  PARENT oGroup0 PROMPT ' Leto'           OBJECT oL
@ 2,1   DCRADIO cLMQ VALUE 'M'  PARENT oGroup0 PROMPT ' Mesec'       OBJECT oM
@ 3,1   DCRADIO cLMQ VALUE 'Q'  PARENT oGroup0 PROMPT ' Kvartal'     OBJECT oQ

when cLMQ='M' before objects are created, the result is that second RADIOBUTTON is marked as 'selected' , but PROMPT 'Leto' is framed with dots (like having focus) and not PROMPT 'Mesec'.
How can I correct this visual annomaly? I'd appreciate any hint.

Thanks
Janko

Re: DCRADIO question

Posted: Thu May 02, 2013 6:11 pm
by rdonnay
DCREAD GUI SETFOCUS @oM

Re: DCRADIO question

Posted: Thu May 02, 2013 11:46 pm
by Janko
Thank you Roger,

I've tried this even before, but it doesn't work.
As well I've used o:xbeP_KillInputFocus() and o:xbeP_SetInputFocus() without desired effect, but I beleive SETFOCUS does the same.

Maybe some other idea?

BR JAnko

Re: DCRADIO question

Posted: Fri May 03, 2013 7:09 am
by rdonnay
The below sample program produces the results you want.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], cLMQ := 'M', oGroup0, oL, oM, oQ


@ 1,10  DCGROUP oGroup0 CAPTION 'Izberi c(asovni interval' SIZE 19,6
@ 1,1   DCRADIO cLMQ VALUE 'L'  PARENT oGroup0 PROMPT ' Leto'           OBJECT oL
@ 2,1   DCRADIO cLMQ VALUE 'M'  PARENT oGroup0 PROMPT ' Mesec'       OBJECT oM
@ 3,1   DCRADIO cLMQ VALUE 'Q'  PARENT oGroup0 PROMPT ' Kvartal'     OBJECT oQ

DCREAD GUI FIT TITLE 'Radio Test' SETFOCUS @oM

RETURN nil

PROC appsys ; return

Re: DCRADIO question

Posted: Sat May 04, 2013 1:54 am
by Janko
Sorry, i missed '@'.
Yes, it works. Thanks.

Janko