Show / Hide Table of Contents

# Class CheckBoxWidget

An object representing a check box used in a PDF Form.

##### Inheritance

object
Annot
Widget
CheckBoxWidget

##### Implements

IDisposable

##### Inherited Members

Widget.Create(SDFDoc, Rect, Field)
Widget.GetField()
Widget.GetHighlightingMode()
Widget.SetHighlightingMode(Widget.HighlightingMode)
Widget.GetAction()
Widget.SetAction(Action)
Widget.GetBorderColorCompNum()
Widget.GetBorderColor()
Widget.SetBorderColor(ColorPt, int)
Widget.GetBackgroundColorCompNum()
Widget.GetBackgroundColor()
Widget.SetBackgroundColor(ColorPt, int)
Widget.GetStaticCaptionText()
Widget.SetStaticCaptionText(string)
Widget.GetRolloverCaptionText()
Widget.SetRolloverCaptionText(string)
Widget.GetMouseDownCaptionText()
Widget.SetMouseDownCaptionText(string)
Widget.GetStaticIcon()
Widget.SetStaticIcon(Obj)
Widget.GetRolloverIcon()
Widget.SetRolloverIcon(Obj)
Widget.GetMouseDownIcon()
Widget.SetMouseDownIcon(Obj)
Widget.GetScaleType()
Widget.SetScaleType(Widget.ScaleType)
Widget.GetIconCaptionRelation()
Widget.SetIconCaptionRelation(Widget.IconCaptionRelation)
Widget.GetScaleCondition()
Widget.SetScaleCondition(Widget.ScaleCondition)
Widget.GetHIconLeftOver()
Widget.SetHIconLeftOver(double)
Widget.GetVIconLeftOver()
Widget.SetVIconLeftOver(double)
Widget.GetFitFull()
Widget.SetFitFull(bool)
Widget.SetTextColor(ColorPt, int)
Widget.GetTextColor()
Widget.GetTextColorCompNum()
Widget.SetFontSize(double)
Widget.GetFontSize()
Widget.SetFont(Font)
Widget.GetFont()
Annot.Dispose()
Annot.Dispose(bool)
Annot.GetHandleInternal()
Annot.GetRefHandleInternal()
Annot.CreateInternal(IntPtr, object)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(string)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(string)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, bool)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance()
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance(Annot.AnnotationState, string)
Annot.SetAppearance(Obj)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj, Annot.AnnotationState, string)
Annot.RemoveAppearance()
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance(Annot.AnnotationState, string)
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(string)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt, int)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(int)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(int)
Annot.RefreshAppearance()
Annot.GetCustomData(string)
Annot.SetCustomData(string, string)
Annot.DeleteCustomData(string)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF.Annots

###### Assembly: PDFTronDotNet.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 annot

##### 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

#### 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 isChecked)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | isChecked |

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

### Implements

IDisposable