Class ListBoxWidget
An object representing a List Box used in a PDF Form.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFNet.dll
Syntax
public class ListBoxWidget : Widget, IDisposable
Constructors
ListBoxWidget(Annot)
Creates a List Box Widget annotation and initialize it using given annotation object.
Declaration
public ListBoxWidget(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 |
ListBoxWidget(Obj)
Creates a List Box Widget annotation and initialize it using given Cos/SDF object.
Declaration
public ListBoxWidget(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | the object to use to initialize the List Box Widget |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Methods
AddOption(string)
Adds option to List Box Widget.
Declaration
public void AddOption(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The option to add |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
AddOptions(string[])
Adds multiple options to List Box Widget.
Declaration
public void AddOptions(string[] options)
Parameters
Type | Name | Description |
---|---|---|
string[] | options | The options to add. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect)
Creates a new List Box Widget annotation, in the specified document with a default field name.
Declaration
public static ListBoxWidget Create(PDFDoc doc, Rect pos)
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. |
Returns
Type | Description |
---|---|
ListBoxWidget | A newly created blank List Box Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, string)
Creates a new List Box Widget annotation, in the specified document.
Declaration
public static ListBoxWidget Create(PDFDoc doc, Rect pos, string field_name)
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. |
string | field_name | The name of the field for which to create a List Box Widget |
Returns
Type | Description |
---|---|
ListBoxWidget | A newly created blank List Box Widget annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Create(PDFDoc, Rect, Field)
Creates a new List Box Widget annotation, in the specified document.
Declaration
public static ListBoxWidget Create(PDFDoc doc, Rect pos, Field field)
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. |
Field | field | the field for which to create a List Box Widget |
Returns
Type | Description |
---|---|
ListBoxWidget | A newly created blank List 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
~ListBoxWidget()
Declaration
protected ~ListBoxWidget()
GetOptions()
Gets all options of the List Box widget.
Declaration
public string[] GetOptions()
Returns
Type | Description |
---|---|
string[] | The options of the List Box widget |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetSelectedOptions()
Gets all selected options in the List Box widget.
Declaration
public string[] GetSelectedOptions()
Returns
Type | Description |
---|---|
string[] | The selected options of the List Box widget |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
RemoveOption(string)
Remove the option from the List Box widget.
Declaration
public void RemoveOption(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The option to remove |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ReplaceOptions(string[])
Replaces the current List Box widget options with a new set.
Declaration
public void ReplaceOptions(string[] new_opts)
Parameters
Type | Name | Description |
---|---|---|
string[] | new_opts | The new set of options to use. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetSelectedOptions(string[])
Sets the options for the List Box Widget.
Declaration
public void SetSelectedOptions(string[] options)
Parameters
Type | Name | Description |
---|---|---|
string[] | options | The options to select. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |