ListView control
Interrogated targets represented by the ListView control supports the general control properties, methods and events. For more information, see General Windows Control Properties, Methods, and Events. In addition, Studio exposes properties, methods, and events that are specific to this control.
Note: ListView controls created for targets in specific applications, such as SAP, have separate properties methods and events. For more information, see SAP GUI Controls.
Properties
Property |
Description |
Columns |
Gets a list of columns within the ListView. (Obj[] type) |
Count |
Gets the number of items in the control. (Int32 type) |
DataTable |
Gets a dataset containing the items from the control along with assigned index values. |
Items |
Gets the collection of items (Obj[]) from the control. |
MultSelect |
Gets a value that indicates whether multiple items in the control can be selected. A value of True indicates that multiple items can be selected. (Boolean) |
SelectedCount |
Gets the number (Int32) of selected control items. |
SelectedItems |
Gets a list of the selected items. (String[] type) |
SelectedText |
Gets the text for the selected item. |
Separator |
Gets or sets the character used in item lists to separate the items (for example, see the GetTextList method). |
View |
Gets the current display mode of the ListView:
|
Events
Events |
Description |
ItemClicked |
Occurs when an item in the control is clicked. |
ItemDoubleClicked |
Occurs when an item in the control is double-clicked. |
ItemActivated |
Occurs when an item in the control is activated (through the application or by calling the ActivateSelectedItems method). |
ItemSelected |
Occurs when an item in the control is selected (through the application or by any of the SelectItem methods). |
Updated |
Occurs when items are added or removed from the control. |
Methods
The following methods are used to perform an action on a specific ListView item. To designate the appropriate item, the methods require either a string expression or text. For more information, see Expression Method Parameter. When using text strings to identify the item, the string must provide an exact match to the item text.
Method |
Description |
Parameters |
Return Type |
ActivateSelectedItems |
Activates all selected items. This method can be used with the SelectItem and DeselectItem methods to simulate a user pressing Shift and Ctrl to select multiple files and then double-click to open them. |
None |
Boolean |
ClickItem |
Raises the Click event on the item specified by the expression parameter. For more information, see Expression Method Parameter. |
String Expression |
Boolean |
ClickItemByIndex |
Raises the Click event on the item specified by the index parameter. |
Int32 index |
Boolean |
ClickItemByText |
Raises the Click event on the item specified by the item text parameter. |
String text |
Boolean |
ClickSubitem |
Raises the Click event on the subitem in the column specified by the column index and the item specified by the expression. For more information, see Expression Method Parameter. |
String expression, Int32 col |
Boolean |
ClickSubitem |
Raises the Click event on the subitem in the column specified by the column name and the item specified by the expression. For more information, see Expression Method Parameter. |
String expression, String column |
Boolean |
ClickSubitemByIndex |
Raises the Click event on the subitem in the column specified by the column index and the item specified by the item index. |
Int32 index, Int32 columnIndex |
Boolean |
ClickSubitemByIndex |
Raises the Click event on the subitem in the column specified by the column name and the item specified by the item index. |
Int32 index, String column |
Boolean |
ClickSubitemByText |
Raises the Click event on the subitem in the column specified by the column index and the item specified by the text parameter. |
String text, Int32 columnIndex |
Boolean |
ClickSubitemByText |
Raises the Click event on the subitem in the column specified by the column name and the item specified by the text parameter. |
String text, String column |
Boolean |
DeselectItem |
Deselects the item specified by the expression parameter. For more information, see Expression Method Parameter. |
String Expression |
Boolean |
DeselectItemByIndex |
Deselects the item specified by the item index. |
Int32 Index |
Boolean |
DeselectItemByText |
Deselects the item specified by the text parameter. |
String Text |
Boolean |
DoubleClickItem |
Raises the Double-Click event on the item specified by the expression parameter. For more information, see Expression Method Parameter. |
String Expression |
Boolean |
DoubleClickItemByIndex |
Raises the Double-Click event on the item specified by the item index parameter. |
Int32 Index |
Boolean |
DoubleClickItemByText |
Raises the Double-Click event on the item specified by the item text parameter. |
String text |
Boolean |
DoubleClickSubItem |
Raises the Double-Click event on the sub-item in the column specified by the column index and the item specified by the expression. For more information, see Expression Method Parameter. |
String expression, Int32 col |
Boolean |
DoubleClickSubItem |
Raises the Double-Click event on the sub-item in the column specified by the column name and the item specified by the expression. For more information, see Expression Method Parameter. |
String expression, String column |
Boolean |
DoubleClickSubItemByIndex |
Raises the Double-Click event on the subitem in the column specified by the column name and the item specified by the expression. |
Int32 index, Int32 columnIndex |
Boolean |
DoubleClickSubItemByIndex |
Raises the Double-Click event on the column specified by the string column name for the subitem specified by the corresponding item index. |
Int32 index, String column |
Boolean |
DoubleClickSubitemByText |
Raises the Double-Click event on the column specified by the column index for the subitem specified by the corresponding item text. |
String text, Int32 columnIndex |
Boolean |
DoubleClickSubitemByText |
Raises the Double-Click event on the column specified by the column name for the subitem specified by the corresponding item text. |
String text, String column |
Boolean |
FindItem |
Returns the item specified by the expression parameter. For more information, see Expression Method Parameter. |
String Expression |
ListView item |
FindItemByIndex |
Returns the item specified by the item index parameter. |
Int32 index |
ListView item |
FindItemByText |
Returns the item specified by the item text parameter. |
String Text |
ListView item |
GetFullTextList |
Returns the text list of items in the index column of the control. |
None |
ICollection |
GetItemFullText |
Returns a string containing the text for the item selected by the item index and column index values. |
Int32 index, Int32 column indices |
String |
GetSelectedSubitemText |
Returns the text for the selected subitem from the column designated by the column index. |
Int32 column index |
String |
GetTextList |
Returns a string array of the text for the control items. |
None |
ICollection |
SelectItem |
Selects the item specified by the expression parameter. For more information, see Expression Method Parameter. |
String Expression |
Boolean |
SelectItemByIndex |
Selects the item specified by the item index parameter. |
Int32 index |
Boolean |
SelectItemByText |
Selects the item specified by the text parameter. |
String Text |
Boolean |
Related information
Privacy | Trademarks | Terms of Use | Feedback
Updated: 01 July 2024
© 2016 - 2024 Pegasystems Inc. Cambridge, MA All rights reserved.