Description
Adds a radio button object to a PDFFormFieldRadioButtonGroup object.
Applies to
PDFFormFieldRadioButtonGroup object
Syntax
long Add (PDFFormFieldRadioButton radioButton)
Return value
Long. Returns 1 if it succeeds and -1 if an error occurs. For the full list of error codes, see Error Codes.
Usage
Call the function to add a radio button object to a PDFFormFieldRadioButtonGroup object.
In a PDFFormFieldRadioButtonGroup, only one radio button can be selected. To ensure this, the following rules will apply:
Regarding the current value:
-
If multiple radio buttons have their current value set to true, the last one set to true will remain selected, and the current value of the others will be automatically set to false.
-
If all radio buttons have a current value of false, no action will be taken.
-
If all current values are unset and one radio button has a default value of true, that button's default value will be set as its current value.
-
If any radio button in the group changes its current value (whether to true or false), the default value will not be assigned to the current value.
Regarding the default value:
-
If multiple radio buttons have their default value set to true, the last one set to true will remain selected, and the default value of the others will be automatically set to false.
-
If all radio buttons have a current value of false, no action will be taken.
Examples
This example adds the radio button object lpdf_radiobutton in the PDFFormFieldRadioButtonGroup lpdf_rbgroup.
PDFformfieldradiobuttonGroup lpdf_rbgroup lpdf_rbgroup = create PDFformfieldradiobuttonGroup long ll_return //Add a PDFformfieldradiobutton object to the group ll_return = lpdf_rbgroup.add(lpdf_radiobutton)
See also