Conditional Radiobutton

Conditional Radiobutton

Postby Ross_ValuSoft » 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: Select all  Expand view


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

 
User avatar
Ross_ValuSoft
 
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Conditional Radiobutton

Postby Antonio Linares » Wed Jul 07, 2010 1:04 pm

Ross,

Try it this way:
Code: Select all  Expand view

@ 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Conditional Radiobutton

Postby Ross_ValuSoft » Wed Jul 07, 2010 2:10 pm

Many thanks Antonio.

It works perfectly.

Regards,

Ross
User avatar
Ross_ValuSoft
 
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 23 guests