RadioButton

Represents the radio button field of a interactive forms. Radio buttons are a set of related toggles, at most one of which may be on at any given time; selecting any one of the buttons automatically deselects all the others.

public class RadioButton : FormElement, ISerializable
Public Class RadioButton
    Inherits FormElement
    Implements ISerializable

Inheritance: ObjectPageElementTaggablePageElementFormElementRadioButton

Implements: ISerializable

Derived: AutoRadioButton

Licensing Info

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to create an Radio Button and Add it to the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
     
Module MyModule
     		
    Sub Main()
     		
        ' Create a PDF Document
        Dim MyDocument As Document = New Document
     		
        ' Create a PDF Page
        Dim MyPage As Page = New Page(PageSize.Letter)
     		
        ' Create an Radio Buttons
        Dim MyRadio As RadioButton = New RadioButton("rdbtn", 50, 25, 100, 75)
        MyRadio.DefaultChecked = true
        MyRadio.ToolTip = "first"
    
        Dim MyRadio1 As RadioButton = New RadioButton("rdbtn", 50, 140, 100, 75)
        MyRadio1.DefaultChecked = true
        MyRadio1.ExportValue = "abc"
        MyRadio1.ToolTip = "second"
    
        Dim MyRadio2 As RadioButton = New RadioButton("rdbtn", 50, 250, 100, 75)
        MyRadio2.DefaultChecked = true
        MyRadio2.ExportValue = "xyz"
        MyRadio2.ToolTip = "third"
     		
        ' Add the Radio Buttons to the page
        MyPage.Elements.Add(MyRadio)
        MyPage.Elements.Add(MyRadio1)
        MyPage.Elements.Add(MyRadio2)
     		
        ' Add pages to the document
        MyDocument.Pages.Add(MyPage)
     
        ' Save the PDF document
        MyDocument.Draw("C:\MyDocument.pdf")
     		
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
using ceTe.DynamicPDF.PageElements.Forms;

public class Example
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        // Create a PDF Page
        Page page = new Page(PageSize.Letter);

        // Create an Radio Buttons
        RadioButton radio = new RadioButton("rdbtn", 50, 25, 100, 75);
        radio.DefaultChecked = true;
        radio.ToolTip = "first";

        RadioButton radio1 = new RadioButton("rdbtn", 50, 140, 100, 75);
        radio1.DefaultChecked = true;
        radio1.ExportValue = "abc";
        radio1.ToolTip = "second";

        RadioButton radio2 = new RadioButton("rdbtn", 50, 250, 100, 75);
        radio2.DefaultChecked = true;
        radio2.ExportValue = "xyz";
        radio2.ToolTip = "third";

        // Add the Radio Buttons to the page
        page.Elements.Add(radio);
        page.Elements.Add(radio1);
        page.Elements.Add(radio2);

        // Add pages to the document
        document.Pages.Add(page);

        // Save the PDF document
        document.Draw(outputPath);
    }
}

Remarks

For more details on radio button fields take a look at the Interactive Forms topic.

Constructors

RadioButton(String, Single, Single, Single, Single)Creates a new instance of RadioButton class.

Properties

BackgroundColorGets or Sets the fill/background color of a form field.
(Inherited from FormElement)
BorderColorGets or Sets the border color of a form field.
(Inherited from FormElement)
BorderStyleGets or Sets the BorderStyle .
(Inherited from FormElement)
DefaultCheckedGets or Sets the radio button default checked state.
ExportValueGets or Sets the export value. To create a set of mutually exclusive radio buttons (i.e., where only one can be selected at a time), give the fields the same name but different export values.
HeightGets or Sets the height of a form field.
(Inherited from FormElement)
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
MappingNameGets or Sets an mapping name, of a form field.
(Inherited from FormElement)
NameGets or Sets the name of a form field.
(Inherited from FormElement)
NoExportGets or Sets the export state for the field. If set, the field will not be exported by a submit-form action.
OutputGets or sets output options for the field.
(Inherited from FormElement)
PrintableGets or Sets the form field printable on Pdf. By default its true.
(Inherited from FormElement)
RadiosInUnisonGets or Sets the radio button's unison state. Buttons with the same name and value are selected in unison.
ReaderEventsGets the reader events of the annotation.
(Inherited from FormElement)
ReadOnlyGets or Sets the read only property status of the form field.
(Inherited from FormElement)
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
RequiredGets or Sets the required state for the field. If set, the field must have a value at the time it is exported by a submit-form action.
RotateGets or Sets the angle of a form field. Rotation angle should be multiple of 90, default is 0.
(Inherited from FormElement)
SymbolGets or Sets the type of ?check? to appear in the checkbox.
TagGets or sets the structure element of the form element.
(Inherited from FormElement)
TagOrderGets or sets the tag order of the taggable element.
(Inherited from TaggablePageElement)
TextColorGets or Sets the color of the text for the field.
(Inherited from FormElement)
ToolTipGets or Sets an alternate field name, of a form field.
(Inherited from FormElement)
VisibleGets or Sets the form field visible on Pdf. By default its true.
(Inherited from FormElement)
WidthGets or Sets the width of a form field.
(Inherited from FormElement)
XGets or Sets the X coordinate of a form field.
(Inherited from FormElement)
YGets or Sets the Y coordinate of a form field.
(Inherited from FormElement)

Methods

Draw(PageWriter)Draws the radio button to the given PageWriter object.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements.Forms

In this topic