Class CheckBoxWidget
An object representing a check box used in a PDF Form.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFNet.dll
Syntax
public class CheckBoxWidget : Widget, IDisposable
Constructors
CheckBoxWidget(Annot)
Creates a Check Box Widget annotation and initialize it using given annotation object.
Declaration
public CheckBoxWidget(Annot ann)
Parameters
Type | Name | Description |
---|---|---|
Annot | ann | The annotation to use. |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
CheckBoxWidget(Obj)
Creates a Check Box Widget annotation and initialize it using given Cos/SDF object.
Declaration
public CheckBoxWidget(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | the object to use to initialize the Check Box Widget |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Methods
Create(PDFDoc, Rect)
Creates a new Check Box Widget annotation, in the specified document with a default field name.
Declaration
public static CheckBoxWidget Create(PDFDoc doc, Rect pos)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | The document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
Returns
Type | Description |
---|---|
CheckBoxWidget | A newly created blank Check Box Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, string)
Creates a new Check Box Widget annotation, in the specified document.
Declaration
public static CheckBoxWidget Create(PDFDoc doc, Rect pos, string field_name)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | The document to which the annotation is to be added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
string | field_name | The name of the field for which to create a CheckBox widget |
Returns
Type | Description |
---|---|
CheckBoxWidget | A newly created blank Check Box Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, Field)
Creates a new Widget annotation, in the specified document.
Declaration
public static CheckBoxWidget Create(PDFDoc doc, Rect pos, Field field)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | A document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
Field | field | the field for which to create a CheckBox widget |
Returns
Type | Description |
---|---|
CheckBoxWidget | A newly created blank Check Box Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
Overrides
~CheckBoxWidget()
Declaration
protected ~CheckBoxWidget()
IsChecked()
Returns whether the checkbox is checked.
Declaration
public bool IsChecked()
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the checkbox is checked. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetChecked(bool)
Check or uncheck the Check Box Widget
Declaration
public void SetChecked(bool value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | If true, the annotation should be checked. Otherwise it should be unchecked. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |