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