[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.AcroForms.CheckBoxField

Class CheckBoxField

Namespace
GrapeCity.Documents.Pdf.AcroForms
Assembly
GcDocs.Pdf.dll

Represents CheckBox AcroForm field.

public class CheckBoxField : Field, IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef
Inheritance
object
CheckBoxField
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Constructors

CheckBoxField()

Initializes a new instance of the CheckBoxField class.

public CheckBoxField()

Properties

Checked

Gets or sets the value of this CheckBoxField as a Boolean value. See ValueObj for details.

public bool Checked { get; set; }

Property Value

bool
See Also

DefaultChecked

Gets or sets the default value of this CheckBoxField as a Boolean value. See ValueObj for details.

public bool DefaultChecked { get; set; }

Property Value

bool
See Also

DefaultValue

Gets or sets the default value of this CheckBoxField.

[Obsolete("Use the DefaultChecked property instead.")]
public bool DefaultValue { get; set; }

Property Value

bool
See Also

DefaultValueObj

Gets or sets the default value of this CheckBoxField. See ValueObj for details.

public object DefaultValueObj { get; set; }

Property Value

object
See Also

Opt

Gets or sets an array of strings containing one entry for each widget annotation. defining export values for its constituent check boxes. See the PDF spec for details.

public string[] Opt { get; set; }

Property Value

string[]

Value

Gets or sets the value of this CheckBoxField.

[Obsolete("Use the Checked property instead. See also the ValueObj property.")]
public bool Value { get; set; }

Property Value

bool
See Also

ValueObj

Gets or sets the object value of this checkbox field.

Gets false if none of the associated widgets is checked. Otherwise gets true if all widgets use the same name for the checked appearance stream, or the name of the appearance stream that is used to display the checked state.

When set, if a Boolean value is specified, it is assigned as is to the checked state. If the assigned value is not a Boolean, it is converted to string and is interpreted as the name of the widget's appearance stream used to show the widget's checked state. If no such stream exists, the checkbox will show as unchecked.
public object ValueObj { get; set; }

Property Value

object
See Also

Widget

Gets the WidgetAnnotation defining view properties of the CheckBoxField.

public WidgetAnnotation Widget { get; }

Property Value

WidgetAnnotation

Methods

GetCheckedAppearanceStreamName(WidgetAnnotation)

Gets the name of a widget annotation's appearance stream that is used to display the widget in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.

public string GetCheckedAppearanceStreamName(WidgetAnnotation wa)

Parameters

wa WidgetAnnotation

One of WidgetAnnotations associated with this field.

Returns

string

The name of the widget annotation's appearance stream that is used to display the widget in checked state.

GetCheckedAppearanceStreamNames()

Gets the names of appearance streams of the widget annotations associated with this field that are used to display the widgets in checked state. In Acrobat these names are specified as "Export Value" option in the Check Box field properties.

public string[] GetCheckedAppearanceStreamNames()

Returns

string[]

The names of the widget annotations' appearance streams that are used to display the widgets in checked state.

HasRadioButtonBehavior()

Checks whether this CheckBoxField actually behaves as a RadioButtonField. This situation takes place if the checkbox field owns more than one WidgetAnnotations, and the widgets' appearance streams used to show checked state have different names.

public bool HasRadioButtonBehavior()

Returns

bool

true if this checkbox behaves as a radio button, false otherwise.

SetCheckedAppearanceStreamName(WidgetAnnotation, string)

Sets the name of a widget annotation's appearance stream that will be used to display the widget in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.

public void SetCheckedAppearanceStreamName(WidgetAnnotation wa, string name)

Parameters

wa WidgetAnnotation

One of WidgetAnnotations associated with this field.

name string

The name of the appearance stream to use for checked state.

SetCheckedAppearanceStreamNames(string)

Sets the name of an appearance stream that will be used by the widget annotations associated with this field to display the widgets in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.

public void SetCheckedAppearanceStreamNames(string name)

Parameters

name string

The name of the appearance stream to use for checked state.