GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfListBoxField Class

    Namespace:
    GemBox.Pdf.Forms
    Assembly:
    GemBox.Pdf.dll

    Represents a scrollable list box.

    • C#
    • VB.NET
    public sealed class PdfListBoxField : PdfChoiceField
    Public NotInheritable Class PdfListBoxField
        Inherits PdfChoiceField
    Inheritance:
    System.Object
    PdfObject
    PdfAnnotation
    PdfField
    PdfVariableTextField
    PdfChoiceField
    PdfListBoxField

    Properties

    FieldType

    Gets the ListBox value.

    • C#
    • VB.NET
    public override PdfFieldType FieldType { get; }
    Public Overrides ReadOnly Property FieldType As PdfFieldType
    Property Value
    PdfFieldType

    The ListBox value.

    Overrides
    PdfField.FieldType

    MultipleSelection

    (PDF 1.4) Gets a value indicating whether more than one of the field’s option items may be selected simultaneously.

    Default value: false.

    • C#
    • VB.NET
    public bool MultipleSelection { get; set; }
    Public Property MultipleSelection As Boolean
    Property Value
    System.Boolean

    true if more than one of the field’s option items may be selected simultaneously; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.4 Choice Fields'

    SelectedIndices

    (PDF 1.4) Gets the collection of indices of the selected items.

    • C#
    • VB.NET
    public ICollection<int> SelectedIndices { get; }
    Public ReadOnly Property SelectedIndices As ICollection(Of Integer)
    Property Value
    System.Collections.Generic.ICollection<System.Int32>

    The collection of indices of the selected items.

    SelectedItems

    (PDF 1.4) Gets the collection of selected items.

    • C#
    • VB.NET
    public ICollection<PdfChoiceFieldItem> SelectedItems { get; }
    Public ReadOnly Property SelectedItems As ICollection(Of PdfChoiceFieldItem)
    Property Value
    System.Collections.Generic.ICollection<PdfChoiceFieldItem>

    The collection of selected items.

    TopIndex

    Gets or set the top index (the index in the Items of the first option visible in the scrollable list box).

    Default value: 0.

    • C#
    • VB.NET
    public int TopIndex { get; set; }
    Public Property TopIndex As Integer
    Property Value
    System.Int32

    The top index (the index in the Items of the first option visible in the scrollable list box).

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than zero or greater than or equal to number of Items.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.4.4 Choice Fields'

    Value

    Gets or sets the PdfListBoxField value as an instance of either a System.String or an System.Array of System.String type (if more than one item is selected).

    • C#
    • VB.NET
    public object Value { get; set; }
    Public Property Value As Object
    Property Value
    System.Object

    The PdfListBoxField value as an instance of either a System.String or an System.Array of System.String type (if more than one item is selected).

    Inherited Properties

    Actions

    (Optional; PDF 1.1) An action that shall be performed when the field's annotation is activated (see 12.6, "Actions").

    (Inherited from PdfField)

    AnnotationType

    Gets the Widget value.

    (Inherited from PdfField)

    Appearance

    Gets the appearance settings for this PdfVariableTextField.

    (Inherited from PdfVariableTextField)

    AssociatedFiles

    (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.

    (Inherited from PdfAnnotation)

    Bounds

    (Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units.

    (Inherited from PdfAnnotation)

    CommitSelectedValueImmediately

    (PDF 1.5) If set to true, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or "commits" the data choice and triggers any actions associated with the entry or changing of this data. If this property is true, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.

    This property enables applications to perform an action once a selection is made, without requiring the user to exit the field. If false, the new value is not committed until the user exits the field.

    (Inherited from PdfChoiceField)

    DefaultValue

    (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed. The format of this value is the same as that of Value.

    (Inherited from PdfField)

    Hidden

    (PDF 1.2) If set, do not display the annotation on the screen or allow it to interact with the user.

    The annotation may be printed (depending on the setting of the Print flag) but should be considered hidden for purposes of on-screen display and user interaction.

    (Inherited from PdfField)

    Items

    Gets the items of this PdfChoiceField.

    (Inherited from PdfChoiceField)

    Locked

    (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

    (Inherited from PdfAnnotation)

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Name

    Gets the (fully qualified) field name.

    (Inherited from PdfField)

    Page

    Gets the page with which this annotation is associated.

    (Inherited from PdfAnnotation)

    Print

    (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen.

    note

    This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.

    (Inherited from PdfField)

    ReadOnly

    If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.

    (Inherited from PdfField)

    SelectedIndex

    Gets or sets the index of the selected item or -1 if no item is selected.

    (Inherited from PdfChoiceField)

    SelectedItem

    Gets or sets the selected item or null if no item is selected.

    (Inherited from PdfChoiceField)

    Tooltip

    (Optional; PDF 1.3) An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes (see 14.9.3, "Alternate Descriptions").

    (Inherited from PdfField)

    Inherited Methods

    SetBounds(System.Double, System.Double)

    Sets the size of the Bounds.

    (Inherited from PdfAnnotation)

    SetBounds(System.Double, System.Double, System.Double, System.Double)

    Sets the Bounds.

    (Inherited from PdfAnnotation)

    ToString()

    Returns a System.String that represents this PdfField instance.

    (Inherited from PdfField)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7.4.4 Choice Fields'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.