Click or drag to resize

RadioButtonFormFieldMakeRadioSet Method (GlobalResources, PdfGeneratedPage, String, String, String, String, PdfBounds)

Makes a set of radio button fields with a single parent field. If currentValue or defaultValue are null, the code will substitute the standard radio button cleared value.

Namespace:  Atalasoft.PdfDoc.Generating.Forms
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public static RadioButtonFormField MakeRadioSet(
	GlobalResources gr,
	PdfGeneratedPage owningPage,
	string fieldName,
	string currentValue,
	string defaultValue,
	string[] values,
	PdfBounds[] locations
)

Parameters

gr
Type: Atalasoft.PdfDoc.Generating.ResourceHandlingGlobalResources
The resources for holding button appearances.
owningPage
Type: Atalasoft.PdfDoc.GeneratingPdfGeneratedPage
The page that will own the radio buttons.
fieldName
Type: SystemString
The name of the output form field
currentValue
Type: SystemString
The current setting from the set.
defaultValue
Type: SystemString
The default value for the set.
values
Type: SystemString
The possible values for the radio buttons.
locations
Type: Atalasoft.PdfDoc.GeometryPdfBounds
The locations of each radio button.

Return Value

Type: RadioButtonFormField
A single parent RadioButtonFormField that represents a group of radio buttons and their current value (if any).
Examples
How to make a simple set of radio buttons with nothing selected and no default value. Note that this does not create any text on the page, just the buttons. The standard radio button appearance is just the functional part of the button and doesn't include any labeling so that it can be shared across many buttons.
RadioButtonFormField field = RadioButtonFormField.MakeRadioSet(doc.Resources, page,
          "CallMeHow",
          null, null,
          new string[] {"Yes", "No", "Maybe"},
          new PdfBounds[] { new PdfBounds(72, 100, 8, 8), new PdfBounds(72, 90, 8, 8), new PdfBounds(72, 80, 8, 8) });
doc.Form.Fields.Add(field);
See Also