version 6.0
Selected list item (list) Long
| Parameter | Type | Description | |
| list | ListRef | List reference number | |
| Function result | Long | Position of current selected list item | |
| in expanded list |
Description
The command Selected list item returns the position of the selected item in the list whose reference number you pass in list.
You apply this command to a list displayed in a form to detect which item the user has selected.
If the list has sublists, you apply the command to the main list (the one actually defined in the form), not one of its sublists. The position is expressed relative to the top item of the main list, using the current expanded/collapsed state of the list and its sublist.
Examples
Here a list named hList, shown in User environment:
$vlItemPos:=Selected list item(hList) ` at this point $vlItemPos gets 2
$vlItemPos:=Selected list item(hList) ` at this point $vlItemPos gets 4
$vlItemPos:=Selected list item(hList) ` at this point $vlItemPos gets 7
$vlItemPos:=Selected list item(hList) ` at this point $vlItemPos gets 5
See Also
SELECT LIST ITEM, SELECT LIST ITEM BY REFERENCE.