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: (.NET 4.5.2, x86)
public static RadioButtonFormField MakeRadioSet(
	GlobalResources gr,
	PdfGeneratedPage owningPage,
	string fieldName,
	string currentValue,
	string defaultValue,
	string[] values,
	PdfBounds[] locations


Type: Atalasoft.PdfDoc.Generating.ResourceHandlingGlobalResources
The resources for holding button appearances.
Type: Atalasoft.PdfDoc.GeneratingPdfGeneratedPage
The page that will own the radio buttons.
Type: SystemString
The name of the output form field
Type: SystemString
The current setting from the set.
Type: SystemString
The default value for the set.
Type: SystemString
The possible values for the radio buttons.
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).
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,
          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) });
See Also