‎2007 May 15 3:22 AM
hello friends,
i was trying to practise a module pool program with one screen , which has three radio buttons A,B,C there should be no default selection, if once a radio is selected, as soon as the radio is selected a subprogram shpould be ivoked , which will display you selected A or B or C.
can any one plz help me with the code.
thanks in advance.
‎2007 May 15 5:47 AM
hi Kutumba ,
when radio buttons are created on screen you cannot have nothing selected at the begining. you need to select at least one .. check whether you have put all the radio buttons in a single group or not..you can do it by selecting the radio buttions n right click on it then select group. in the attributes of the R.Buttons give the function codes ..
next in PAI event of screen get the fcode and display the message accordingly .
Hope this helps you ..
Regards,
Ranjita
‎2007 May 15 4:26 AM
Step1:
select all the Radio buttons.
Step2:
click right button of your mouse.
Step3:
choose the Radio button Group -> define.
It's over
‎2007 May 15 5:24 AM
Hi Kutumba,
First of all, if there are radiobuttons then u cant have none of them selected at a time.
One radiobutton will always be selected.
Once u create the radiobuttons on screen, u can group them in one radiobutton group so that only one of the three can be selected at a time.
This u can do by going to Edit --> Grouping --> Radiobutton Group --> Define.
Also, u will need to assign a function code after this which will get triggered whenever any of the radiobuttons is checked.
In the PAI event the u can check for the radiobutton checked and display it.
Regards,
Himanshu
‎2007 May 15 5:33 AM
hi,
make all radi buttons as a group by Edit --> Grouping --> Radiobutton Group --> Define and in pAI Event give code as
module check [double click]
in code section
module check
if rr1 ='x'. [where rr1,rr2,rr3 are names given to radio button group]
write 'r1 is selected'.
else.
if rr2 = 'x'.
write 'rr2 is selected'.
else.
write 'rr2 is selected'
endif.
end module.
if helpful reward some points.
with regards,
suresh babu aluri.
‎2007 May 15 5:47 AM
hi Kutumba ,
when radio buttons are created on screen you cannot have nothing selected at the begining. you need to select at least one .. check whether you have put all the radio buttons in a single group or not..you can do it by selecting the radio buttions n right click on it then select group. in the attributes of the R.Buttons give the function codes ..
next in PAI event of screen get the fcode and display the message accordingly .
Hope this helps you ..
Regards,
Ranjita