FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC Conditional Radiobutton
Posts: 87
Joined: Thu Dec 18, 2008 11:27 AM
Conditional Radiobutton
Posted: Wed Jul 07, 2010 12:15 PM
Hi everyone,

This should be a simple one for most of you ... I hope.

I have two radiobuttons which are both initialised to the first position.

If I change from position 1 ("Pass") to position 2 ("Fail") in the first radiobutton, how do I get position 5 ("Withdrawn from service") to be selected and displayed in the second radiobutton?

Thanks,

Ross

Code (fw): Select all Collapse
nVis := 1
nRes := 1
@ 1.5 + nOffset, 1 GROUP oGrp to 4, 14 PROMPT "Visual"

@ 0.75, 2 RADIO oRad1 VAR nVis ;
      ITEMS "Pass","Fail" ;
      ON CHANGE {|| IIF( nVis == 2, nRes := 5 , "" ) } ;  <===== need help here
      SIZE 40, 9 of oGrp

@ 5.5 + nOffset, 1 GROUP oGrp2 to 11.5, 32 PROMPT "Results"

@ 0.75, 2 RADIO oRad3 VAR nRes ;
      ITEMS "Visual + Electrical OK","Refitted lead", "Replaced plug", ;
      "Replaced socket", "Withdrawn from service", "Visual only";
      SIZE 140, 12 of oGrp2
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Conditional Radiobutton
Posted: Wed Jul 07, 2010 01:04 PM
Ross,

Try it this way:
Code (fw): Select all Collapse
@ 0.75, 2 RADIO oRad1 VAR nVis ;
      ITEMS "Pass","Fail" ;
      ON CHANGE {|| IIF( nVis == 2, oRad3:SetOption( 5 ), "" ) } ;  <===== need help here
      SIZE 40, 9 of oGrp
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 87
Joined: Thu Dec 18, 2008 11:27 AM
Re: Conditional Radiobutton
Posted: Wed Jul 07, 2010 02:10 PM

Many thanks Antonio.

It works perfectly.

Regards,

Ross

Continue the discussion