ListBoxField

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.WidgetAnnotation, com.aspose.pdf.Field, com.aspose.pdf.ChoiceField

public final class ListBoxField extends ChoiceField

Class represents ListBox field.

Constructors

ConstructorDescription
ListBoxField()Constructor for ListBoxField to be used in Generator.
ListBoxField(Page page, Rectangle rect)Creates new ListBox field.
ListBoxField(IDocument doc, Rectangle rect)Constructor for ListBox field.

Methods

MethodDescription
getTopIndex()Gets index of the top visible element of the list.
setTopIndex(int value)Sets index of the top visible element of the list.
setSelected(int value)Gets index of the selected item.
setSelectedItems(int[] value)Sets array of the selected items in the multiselect list.

ListBoxField()

public ListBoxField()

Constructor for ListBoxField to be used in Generator.

ListBoxField(Page page, Rectangle rect)

public ListBoxField(Page page, Rectangle rect)

Creates new ListBox field.

Parameters:

ParameterTypeDescription
pagePagePage where list box will be placed.
rectRectangleRectangle where list box will be placed on the page.

ListBoxField(IDocument doc, Rectangle rect)

public ListBoxField(IDocument doc, Rectangle rect)

Constructor for ListBox field.

Parameters:

ParameterTypeDescription
docIDocumentDocument to which this field will belong.
rectRectangleRectangle where list box will be placed.

getTopIndex()

public int getTopIndex()

Gets index of the top visible element of the list.

Returns: int - int value

setTopIndex(int value)

public void setTopIndex(int value)

Sets index of the top visible element of the list.

Parameters:

ParameterTypeDescription
valueintint value

setSelected(int value)

public void setSelected(int value)

Gets index of the selected item. Items are numbered from 1.

Parameters:

ParameterTypeDescription
valueintint value

setSelectedItems(int[] value)

public void setSelectedItems(int[] value)

Sets array of the selected items in the multiselect list. For single-select list returns array with single item.

Parameters:

ParameterTypeDescription
valueint[]array of int values