public class SelectElement extends FormElement<HTMLSelectElement>
The SelectElement represents a wrapper that is associated with the HTMLSelectElement
Constructor and Description |
---|
SelectElement(HTMLSelectElement element)
Initializes a new instance of the
SelectElement class. |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Represents the Id attribute of the input element.
|
boolean |
getMultiple()
If true, multiple
OPTION elements may be selected in this SELECT . |
String |
getName()
Represent the name attribute of the input element.
|
OptionCollection |
getOptions()
Returns a list of options
|
com.aspose.html.internal.ms.System.Collections.Generic.IGenericList<String> |
getSelectedOptions()
Returns a list of selected options
|
String |
getType()
The type of this form control.
|
String |
getValue()
On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
|
void |
selectItems(int... indexes)
This methods allows to select multiple options by their indexes.
|
void |
selectItems(String... values)
This methods allows to select multiple options by their values.
|
void |
setId(String value)
Represents the Id attribute of the input element.
|
void |
setMultiple(boolean value)
If true, multiple
OPTION elements may be selected in this SELECT . |
void |
setName(String value)
Represent the name attribute of the input element.
|
void |
setValue(String value)
On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
|
getHtmlElement
public SelectElement(HTMLSelectElement element)
Initializes a new instance of the SelectElement
class.
element
- The element.public String getValue()
On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
getValue
in class com.aspose.html.forms.FormElementBase
public void setValue(String value)
On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
setValue
in class com.aspose.html.forms.FormElementBase
public String getName()
Represent the name attribute of the input element.
Value: The name of the element.getName
in class com.aspose.html.forms.FormElementBase
public void setName(String value)
Represent the name attribute of the input element.
Value: The name of the element.setName
in class com.aspose.html.forms.FormElementBase
public String getId()
Represents the Id attribute of the input element.
Value: The identifier of the element.getId
in class com.aspose.html.forms.FormElementBase
public void setId(String value)
Represents the Id attribute of the input element.
Value: The identifier of the element.setId
in class com.aspose.html.forms.FormElementBase
public String getType()
The type of this form control. This is the string "select-multiple" when the multiple attribute is true
and the string "select-one" when false
.
public boolean getMultiple()
If true, multiple OPTION
elements may be selected in this SELECT
. See the multiple attribute definition in HTML 4.01.
public void setMultiple(boolean value)
If true, multiple OPTION
elements may be selected in this SELECT
. See the multiple attribute definition in HTML 4.01.
public com.aspose.html.internal.ms.System.Collections.Generic.IGenericList<String> getSelectedOptions()
Returns a list of selected options
public OptionCollection getOptions()
Returns a list of options
public void selectItems(int... indexes)
This methods allows to select multiple options by their indexes.
indexes
- An array of indexes for parameter selection.public void selectItems(String... values)
This methods allows to select multiple options by their values.
values
- An array of values for parameter selection.