FRM065 - Using List Components
In this step you will create Click events for the radio buttons to make the required search by field visible.
1. Create a Click event for RadioButton1.
2. Add logic to make iiiSRCNAME visible and hide fields iiiSRCDEP and iiiSRCDATE. Your code should look like the following:
* Surname search
Evtroutine Handling(#RDBN_1.Click)
#iiiSRCNAME.visible := true
#iiiSRCDEP.visible := false
#iiiSRCDATE.visible := false
Endroutine
3. Create Click events for RadioButton2 and RadioButton3. Copy and paste the code from the RadioButton1.Click event into each routine and carefully modify the code as required.
Tip: As we have not renamed the radio buttons, it is a good idea to add a comment above each click event defining which search this is.
4. Compile and test your form. Clicking on each radio button should show one field only.