Show / Hide Table of Contents

# Class Widget

Interactive forms use widget annotations (PDF 1.2) to represent the appearance of fields and to manage user interactions. As a convenience, when a field has only a single associated widget annotation, the contents of the field dictionary and the annotation dictionary may be merged into a single dictionary containing entries that pertain to both a field and an annotation. NOTE This presents no ambiguity, since the contents of the two kinds of dictionaries do not conflict.

##### Inheritance

object
Annot
Widget
CheckBoxWidget
ComboBoxWidget
ListBoxWidget
PushButtonWidget
RadioButtonWidget
SignatureWidget
TextWidget

##### Implements

IDisposable

##### Inherited Members

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 Widget : Annot, IDisposable

### Constructors

#### Widget(Annot)

Creates a Widget annotation and initialize it using given annotation object.

##### Declaration

    public Widget(Annot ann)

##### Parameters

Type | Name | Description
--- | --- | ---
Annot | ann | The input annotation.

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

#### Widget(Obj)

Creates a Widget annotation and initialize it using given Cos/SDF object.

##### Declaration

    public Widget(Obj d)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | d | the d

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

### Methods

#### Create(SDFDoc, Rect, Field)

Creates a new Widget annotation, in the specified document.

##### Declaration

    public static Widget Create(SDFDoc doc, Rect pos, Field field)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | 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

##### Returns

Type | Description
--- | ---
Widget | A newly created blank Widget annotation.

##### Exceptions

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

#### ~Widget()

Releases all resources used by the Widget

##### Declaration

    protected ~Widget()

#### GetAction()

Gets the action of the Widget annotation.

##### Declaration

    public Action GetAction()

##### Returns

Type | Description
--- | ---
Action | An action object representing the action of the Widget annotation.

##### Remarks

The action is an action that shall be performed when the annotation is activated

##### Exceptions

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

#### GetBackgroundColor()

Gets the background color of the Widget annotation.

##### Declaration

    public ColorPt GetBackgroundColor()

##### Returns

Type | Description
--- | ---
ColorPt | A ColorPt object that denotes the color of the Widget background.

##### Remarks

that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBackgroundColorCompNum" to access the color space information corresponding to the border color.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetBackgroundColorCompNum()

Gets the number indicating background color space of the Widget annotation.

##### Declaration

    public int GetBackgroundColorCompNum()

##### Returns

Type | Description
--- | ---
int | An integer indicating a color space value from the ColorSpace.Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk" if color space is applicable, orelse 0 corresponding to "e_null" if the color is transparent.

##### Remarks

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetBorderColor()

Gets the border color of the Widget annotation.

##### Declaration

    public ColorPt GetBorderColor()

##### Returns

Type | Description
--- | ---
ColorPt | A ColorPt object that denotes the color of the Widget border.

##### Remarks

that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBorderColorCompNum" to access the color space information corresponding to the border color.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetBorderColorCompNum()

Gets the number indicating border color space of the Widget annotation.

##### Declaration

    public int GetBorderColorCompNum()

##### Returns

Type | Description
--- | ---
int | An integer indicating a color space value from the ColorSpace.Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk" if color space is applicable, orelse 0 corresponding to "e_null" if the color is transparent.

##### Remarks

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetField()

Gets the field corresponding to the Widget annotation.

##### Declaration

    public Field GetField()

##### Returns

Type | Description
--- | ---
Field | A Field object.

##### Exceptions

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

#### GetFitFull()

Gets the fit full option being used.

##### Declaration

    public bool GetFitFull()

##### Returns

Type | Description
--- | ---
bool | A boolean value indicating the fit full option being used.

##### Remarks

the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.

##### Exceptions

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

#### GetFont()

Retrieves the font used for displaying text in this Widget.

##### Declaration

    public Font GetFont()

##### Returns

Type | Description
--- | ---
Font | The font used by this Widget

##### Exceptions

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

#### GetFontSize()

Returns the font size used in this Widget Annotation.

##### Declaration

    public double GetFontSize()

##### Returns

Type | Description
--- | ---
double | the font size

##### Remarks

A font size of 0 specifies that the text should be autosized to fit in the Widget.

##### Exceptions

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

#### GetHIconLeftOver()

Gets the horizontal leftover of the icon within the annotatin.

##### Declaration

    public double GetHIconLeftOver()

##### Returns

Type | Description
--- | ---
double | A number indicating the horizontal leftover of the icon within the annotation.

##### Remarks

the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.

##### Exceptions

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

#### GetHighlightingMode()

Gets the HighlightingMode of the Widget Annotation.

##### Declaration

    public Widget.HighlightingMode GetHighlightingMode()

##### Returns

Type | Description
--- | ---
Widget.HighlightingMode | an entry of the enum "HighlightingMode", specifying the highlighting mode of the widget annotation.

##### Exceptions

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

#### GetIconCaptionRelation()

Gets the Icon and caption relationship of the Widget annotation.

##### Declaration

    public Widget.IconCaptionRelation GetIconCaptionRelation()

##### Returns

Type | Description
--- | ---
Widget.IconCaptionRelation | An entry of the "IconCaptionRelation" enum which represents the relationship between the icon and the caption of the Widget annotation.

##### Exceptions

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

#### GetMouseDownCaptionText()

Gets the button down caption text of the Widget annotation.

##### Declaration

    public string GetMouseDownCaptionText()

##### Returns

Type | Description
--- | ---
string | A string containing the button down text of the Widget annotation.

##### Remarks

The button down caption shall be displayed when the mouse button is pressed within its active area.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetMouseDownIcon()

Gets the Mouse Down icon associated with the Widget annotation.

##### Declaration

    public Obj GetMouseDownIcon()

##### Returns

Type | Description
--- | ---
Obj | An SDF object that represents the Mouse Down icon associated with the Widget annotation.

##### Remarks

The Mouse Down icon object is a form XObject defining the widget annotation’s alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area. This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetRolloverCaptionText()

Gets the roll over caption text of the Widget annotation.

##### Declaration

    public string GetRolloverCaptionText()

##### Returns

Type | Description
--- | ---
string | A string containing the static caption text of the Widget annotation.

##### Remarks

The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.

    This property is part of the Widget appearance characteristics dictionary, this dictionary
    that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual
    presentation on the page.

##### Exceptions

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

#### GetRolloverIcon()

Gets the rollover icon associated with the Widget annotation.

##### Declaration

    public Obj GetRolloverIcon()

##### Returns

Type | Description
--- | ---
Obj | An SDF object that represents the rollover icon associated with the Widget annotation.

##### Remarks

The rollover icon object is a form XObject defining the widget annotation’s rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.

    This property is part of the Widget appearance characteristics dictionary, this dictionary
    that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual
    presentation on the page.

##### Exceptions

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

#### GetScaleCondition()

Gets the condition under which the icon should be scaled.

##### Declaration

    public Widget.ScaleCondition GetScaleCondition()

##### Returns

Type | Description
--- | ---
Widget.ScaleCondition | an entry of the "ScaleCondition" enum which the icon should be scaled.

##### Remarks

This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button’s icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation’s icons (normal, rollover, and alternate).

##### Exceptions

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

#### GetScaleType()

Gets the Scale Type of the Widget annotation.

##### Declaration

    public Widget.ScaleType GetScaleType()

##### Returns

Type | Description
--- | ---
Widget.ScaleType | An entry of the "ScaleType" enum which represents the Scale Type of the Widget annotation.

##### Remarks

This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button’s icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation’s icons (normal, rollover, and alternate).

##### Exceptions

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

#### GetStaticCaptionText()

Gets static caption text of the Widget annotation.

##### Declaration

    public string GetStaticCaptionText()

##### Returns

Type | Description
--- | ---
string | A string containing the static caption text of the Widget annotation.

##### Remarks

The static caption is the widget annotation’s normal caption, which shall be displayed when it is not interacting with the user. Unlike the remaining entries with the captions, which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### GetStaticIcon()

Gets the static icon associated with the Widget annotation.

##### Declaration

    public Obj GetStaticIcon()

##### Returns

Type | Description
--- | ---
Obj | An SDF object that represents the static icon associated with the Widget annotation.

##### Remarks

The static icon object is a form XObject defining the widget annotation’s normal icon, which shall be displayed when it is not interacting with the user.

    This property is part of the Widget appearance characteristics dictionary, this dictionary
    that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual
    presentation on the page.

##### Exceptions

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

#### GetTextColor()

Returns the text color of the Widget Annotation.

##### Declaration

    public ColorPt GetTextColor()

##### Returns

Type | Description
--- | ---
ColorPt | The text color.

##### Remarks

that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetTextColorCompNum" to access the color space information corresponding to the border color.

##### Exceptions

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

#### GetTextColorCompNum()

Returns the number of color components in the text color of the Widget Annotation.

##### Declaration

    public int GetTextColorCompNum()

##### Returns

Type | Description
--- | ---
int | An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk" if color space is applicable.

##### Exceptions

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

#### GetVIconLeftOver()

Gets the vertical leftover of the icon within the annotatin.

##### Declaration

    public double GetVIconLeftOver()

##### Returns

Type | Description
--- | ---
double | a number indicating the vertical leftover of the icon within the annotation.

##### Remarks

the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.

##### Exceptions

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

#### SetAction(Action)

Sets the action of the Widget annotation (Optional; PDF 1.2 )

##### Declaration

    public void SetAction(Action action)

##### Parameters

Type | Name | Description
--- | --- | ---
Action | action | An action object representing the action of the Widget annotation.

##### Remarks

The action is an action that shall be performed when the annotation is activated

##### Exceptions

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

#### SetBackgroundColor(ColorPt, int)

Sets the background color of the Widget. (Optional)

##### Declaration

    public void SetBackgroundColor(ColorPt c, int CompNum)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorPt | c | A ColorPt object that denotes the color of the wdget background.
int | CompNum | An int whose value implies the color space used for the parameter c.

##### Remarks

it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace.Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetBorderColor(ColorPt, int)

Sets the border color of the Widget. (Optional)

##### Declaration

    public void SetBorderColor(ColorPt c, int CompNum)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorPt | c | A ColorPt object that denotes the color of the wdget border.
int | CompNum | An int whose value implies the color space used for the parameter c.

##### Remarks

it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace.Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetFitFull(bool)

Sets the fit full option being used. (Optional)

##### Declaration

    public void SetFitFull(bool ff)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | ff | A boolean value indicating the fit full option being used.

##### Remarks

the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.

##### Exceptions

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

#### SetFont(Font)

Specifies a font to be used for text in this Widget

##### Declaration

    public void SetFont(Font font)

##### Parameters

Type | Name | Description
--- | --- | ---
Font | font | the font to use

##### Exceptions

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

#### SetFontSize(double)

Sets the font size of the Widget Annotation.

##### Declaration

    public void SetFontSize(double font_size)

##### Parameters

Type | Name | Description
--- | --- | ---
double | font_size | the new font size

##### Remarks

A font size of 0 specifies that the text should be autosized to fit in the Widget.

##### Exceptions

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

#### SetHIconLeftOver(double)

Sets the horizontal leftover of the icon within the annotatin. (Optional)

##### Declaration

    public void SetHIconLeftOver(double hl)

##### Parameters

Type | Name | Description
--- | --- | ---
double | hl | A number indicating the horizontal leftover of the icon within the annotation.

##### Remarks

the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.

##### Exceptions

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

#### SetHighlightingMode(HighlightingMode)

Sets the HighlightingMode of the Widget Annotation. (Optional)

##### Declaration

    public void SetHighlightingMode(Widget.HighlightingMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Widget.HighlightingMode | mode | an entry of the enum "HighlightingMode", specifying the highlighting mode of the widget annotation.

##### Exceptions

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

#### SetIconCaptionRelation(IconCaptionRelation)

Sets the Icon and caption relationship of the Widget annotation. (Optional; pushbutton fields only)

##### Declaration

    public void SetIconCaptionRelation(Widget.IconCaptionRelation icr)

##### Parameters

Type | Name | Description
--- | --- | ---
Widget.IconCaptionRelation | icr | An entry of the "IconCaptionRelation" enum which represents the relationship between the icon and the caption of the Widget annotation.

##### Exceptions

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

#### SetMouseDownCaptionText(string)

Sets the button down caption text of the Widget annotation. (Optional; button fields only)

##### Declaration

    public void SetMouseDownCaptionText(string ct)

##### Parameters

Type | Name | Description
--- | --- | ---
string | ct | A string containing the button down text of the Widget annotation.

##### Remarks

The button down caption shall be displayed when the mouse button is pressed within its active area.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetMouseDownIcon(Obj)

Sets the Mouse Down icon associated with the Widget annotation. (Optional; button fields only) Sets the Mouse Down icon associated with the Widget annotation.

##### Declaration

    public void SetMouseDownIcon(Obj ic)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | ic | An SDF object that represents the Mouse Down icon associated with the Widget annotation.

##### Remarks

The Mouse Down icon object is a form XObject defining the widget annotation’s alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.

    This property is part of the Widget appearance characteristics dictionary, this dictionary
    that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual
    presentation on the page.

##### Exceptions

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

#### SetRolloverCaptionText(string)

Sets the roll over caption text of the Widget annotation. (Optional; button fields only)

##### Declaration

    public void SetRolloverCaptionText(string ct)

##### Parameters

Type | Name | Description
--- | --- | ---
string | ct | A string containing the roll over caption text of the Widget annotation.

##### Remarks

The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.

##### Exceptions

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

#### SetRolloverIcon(Obj)

Sets the rollover icon associated with the Widget annotation. (Optional; button fields only)

##### Declaration

    public void SetRolloverIcon(Obj ic)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | ic | An SDF object that represents the rollover icon associated with the Widget annotation.

##### Remarks

The rollover icon object is a form XObject defining the widget annotation’s rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetScaleCondition(ScaleCondition)

Sets the condition under which the icon should be scaled. (Optional)

##### Declaration

    public void SetScaleCondition(Widget.ScaleCondition sd)

##### Parameters

Type | Name | Description
--- | --- | ---
Widget.ScaleCondition | sd | An entry of the "ScaleCondition" enum which the icon should be scaled.

##### Remarks

This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button’s icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation’s icons (normal, rollover, and alternate).

##### Exceptions

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

#### SetScaleType(ScaleType)

Sets the Scale Type of the Widget annotation. (Optional)

##### Declaration

    public void SetScaleType(Widget.ScaleType st)

##### Parameters

Type | Name | Description
--- | --- | ---
Widget.ScaleType | st | an entry of the "ScaleType" enum which represents the Scale Type of the Widget annotation.

##### Remarks

This property is part of the Icon Fit dictionary, where the Icon Fit. dictionary specifys how to display the button’s icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation’s icons (normal, rollover, and alternate).

##### Exceptions

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

#### SetStaticCaptionText(string)

Sets static caption text of the Widget annotation. (Optional; button fields only)

##### Declaration

    public void SetStaticCaptionText(string ct)

##### Parameters

Type | Name | Description
--- | --- | ---
string | ct | A string containing the static caption text of the Widget annotation.

##### Remarks

The static caption is the widget annotation’s normal caption, which shall be displayed when it is not interacting with the user. Unlike entries "RC, AC, I, RI, IX, IF, TP", which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetStaticIcon(Obj)

Sets the static icon associated with the Widget annotation. (Optional; button fields only)

##### Declaration

    public void SetStaticIcon(Obj ic)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | ic | An SDF object that represents the static icon associated with the Widget annotation.

##### Remarks

The static icon object is a form XObject defining the widget annotation’s normal icon, which shall be displayed when it is not interacting with the user.

This property is part of the Widget appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation’s visual presentation on the page.

##### Exceptions

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

#### SetTextColor(ColorPt, int)

Sets the text color of the Widget Annotation.

##### Declaration

    public void SetTextColor(ColorPt color, int col_comp)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorPt | color | ColorPt object representing the color.
int | col_comp | An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk".

##### Exceptions

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

#### SetVIconLeftOver(double)

Sets the vertical leftover of the icon within the annotatin. (Optional)

##### Declaration

    public void SetVIconLeftOver(double vl)

##### Parameters

Type | Name | Description
--- | --- | ---
double | vl | A number indicating the vertical leftover of the icon within the annotation.

##### Remarks

the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.

##### Exceptions

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

### Implements

IDisposable