To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

ListViewItem

StdWin. ListViewItem

ListViewItem

Constructor

new ListViewItem()

A ListView item object

Methods

clickState() → {Promise.<void>}

Clicks the state image icon.
Returns:
a promise that is fulfilled when the operation is performed.
Type
Promise.<void>

doubleClickState() → {Promise.<void>}

Double-clicks state image icon.
Returns:
a promise that is fulfilled when the operation is performed.
Type
Promise.<void>

dragAndDropOn(target, dragOptionsopt) → {Promise.<void>}

Drags and drops a test object onto the specified target object according to the specified DragOptions behavior.
Parameters:
Name Type Attributes Description
target TestObject | Object The target object on which this object is dropped.
dragOptions Object <optional>
The drag and drop behavior to apply.
Properties
Name Type Attributes Default Description
button MouseButton <optional>
MouseButton.left The mouse button used to drag the object.
dragLocation Location <optional>
The point on the source object where the drag operation begins.
dropLocation Location <optional>
The point on the target object where the drag and drop operation ends.
Returns:
a promise that is fulfilled when the drop operation ends.
Type
Promise.<void>

enableLabelEditing() → {Promise.<void>}

Activates the edit mode for the lists item label to enable renaming. Remarks: This method only enables the item for renaming. To actually rename the item, set its value using EditorTO or EditTO test object, together with an applicable method.
Returns:
a promise that is fulfilled when the operation is performed.
Type
Promise.<void>

getSubItemText(indexOrName) → {Promise.<string>}

Returns the text value of the specified report-style (LVS_REPORT) list-view subitem.
Parameters:
Name Type Description
indexOrName Number | string The 0-based numeric index or name of the list-view subitem you want to retrieve.
Returns:
a promise that is fulfilled with the text value of the subitem.
Type
Promise.<string>

isFocused() → {Promise.<bool>}

Indicates whether the list item is in focus in a multiple selection list box.
Returns:
a promise that is fulfilled with indication whether the item is focused.
Type
Promise.<bool>

isSelected() → {Promise.<bool>}

Indicates whether the list item is selected.
Returns:
a promise that is fulfilled with indication whether the item is selected or not.
Type
Promise.<bool>

setItemState(state) → {Promise.<void>}

Sets the state of the check box icon of the specified item in the list.
Parameters:
Name Type Description
state Number the 0-based state image index.
Returns:
a promise that is fulfilled when the operation is performed.
Type
Promise.<void>

state() → {Promise.<Number>}

The list item's state image index.
Returns:
a promise that is fulfilled with the list item's state image index..
Type
Promise.<Number>

text() → {Promise.<string>}

The text value of the list item, or "" when empty..
Returns:
a promise that is fulfilled with the text of the item.
Type
Promise.<string>