ListBoxField
Contents
[
Hide
]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
Constructor | Description |
---|---|
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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
page | Page | Page where list box will be placed. |
rect | Rectangle | Rectangle 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:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document to which this field will belong. |
rect | Rectangle | Rectangle 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:
Parameter | Type | Description |
---|---|---|
value | int | int value |
setSelected(int value)
public void setSelected(int value)
Gets index of the selected item. Items are numbered from 1.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | int 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:
Parameter | Type | Description |
---|---|---|
value | int[] | array of int values |